mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
[scraper] simplify update seeders query
This commit is contained in:
@@ -130,6 +130,13 @@ function createTorrent(torrent) {
|
||||
return Torrent.upsert(torrent);
|
||||
}
|
||||
|
||||
function setTorrentSeeders(infoHash, seeders) {
|
||||
return Torrent.update(
|
||||
{ seeders: seeders },
|
||||
{ where: { infoHash: infoHash } }
|
||||
);
|
||||
}
|
||||
|
||||
function createFile(file) {
|
||||
return File.upsert(file);
|
||||
}
|
||||
@@ -164,6 +171,7 @@ module.exports = {
|
||||
connect,
|
||||
getProvider,
|
||||
createTorrent,
|
||||
setTorrentSeeders,
|
||||
getTorrent,
|
||||
getTorrentsBasedOnTitle,
|
||||
getUpdateSeedersTorrents,
|
||||
|
||||
Reference in New Issue
Block a user