request scrape update on torrent download

This commit is contained in:
ghost 2023-10-26 04:02:35 +03:00
parent 83ea09adad
commit a47893ff9b
2 changed files with 34 additions and 0 deletions

View file

@ -407,6 +407,22 @@ class TorrentService
}
}
public function updateTorrentScraped(
int $torrentId,
int $time
): void
{
if ($torrent = $this->getTorrent($torrentId))
{
$torrent->setScraped(
time()
);
$this->entityManagerInterface->persist($torrent);
$this->entityManagerInterface->flush();
}
}
public function updateTorrentScrape(
int $torrentId,
int $seeders,