mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2026-04-01 09:35:28 +00:00
update user and magnet timeAdded if newer value found on third-party feed
This commit is contained in:
parent
dd96d56fcc
commit
fca6f623fb
2 changed files with 52 additions and 1 deletions
|
|
@ -575,6 +575,17 @@ class Database {
|
|||
return $query->rowCount();
|
||||
}
|
||||
|
||||
public function updateUserTimeAdded(int $userId, int $timeAdded) : int {
|
||||
|
||||
$this->_debug->query->update->total++;
|
||||
|
||||
$query = $this->_db->prepare('UPDATE `user` SET `timeAdded` = ? WHERE `userId` = ?');
|
||||
|
||||
$query->execute([$timeAdded, $userId]);
|
||||
|
||||
return $query->rowCount();
|
||||
}
|
||||
|
||||
public function updateUserTimeUpdated(int $userId, int $timeUpdated) : int {
|
||||
|
||||
$this->_debug->query->update->total++;
|
||||
|
|
@ -807,6 +818,28 @@ class Database {
|
|||
return $query->rowCount();
|
||||
}
|
||||
|
||||
public function updateMagnetTimeUpdated(int $magnetId, int $timeUpdated) : int {
|
||||
|
||||
$this->_debug->query->update->total++;
|
||||
|
||||
$query = $this->_db->prepare('UPDATE `magnet` SET `timeUpdated` = ? WHERE `magnetId` = ?');
|
||||
|
||||
$query->execute([$timeUpdated, $magnetId]);
|
||||
|
||||
return $query->rowCount();
|
||||
}
|
||||
|
||||
public function updateMagnetTimeAdded(int $magnetId, int $timeAdded) : int {
|
||||
|
||||
$this->_debug->query->update->total++;
|
||||
|
||||
$query = $this->_db->prepare('UPDATE `magnet` SET `timeAdded` = ? WHERE `magnetId` = ?');
|
||||
|
||||
$query->execute([$timeAdded, $magnetId]);
|
||||
|
||||
return $query->rowCount();
|
||||
}
|
||||
|
||||
// Magnet to Info Hash
|
||||
public function addMagnetToInfoHash(int $magnetId, int $infoHashId) : int {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue