potentially resolve RD downloads items metadata

This commit is contained in:
TheBeastLT
2023-04-25 22:09:26 +02:00
parent 4eb167ccc3
commit def60844b2
3 changed files with 18 additions and 12 deletions

View File

@@ -48,8 +48,8 @@ function getTorrent(infoHash) {
return Torrent.findOne({ where: { infoHash: infoHash } });
}
function getTorrentWithFiles(infoHash) {
return Torrent.findOne({ where: { infoHash: infoHash }, include: [File] });
function getFiles(infoHashes) {
return File.findAll({ where: { infoHash: { [Op.in]: infoHashes} } });
}
function getImdbIdMovieEntries(imdbId) {
@@ -109,7 +109,7 @@ function getKitsuIdSeriesEntries(kitsuId, episode) {
module.exports = {
getTorrent,
getTorrentWithFiles,
getFiles,
getImdbIdMovieEntries,
getImdbIdSeriesEntries,
getKitsuIdMovieEntries,