Skip to content

Commit

Permalink
Merge pull request knightcrawler-stremio#149 from Gabisonfire/improve…
Browse files Browse the repository at this point in the history
…-consumer

Simplification of parsing in consumer
  • Loading branch information
iPromKnight authored Mar 11, 2024
2 parents e23ee97 + aeb83c1 commit e24d81d
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 546 deletions.
12 changes: 12 additions & 0 deletions src/node/consumer/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/node/consumer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
},
"license": "MIT",
"dependencies": {
"@ctrl/video-filename-parser": "^5.2.0",
"@tirke/node-cache-manager-mongodb": "^1.6.0",
"amqplib": "^0.10.3",
"axios": "^1.6.1",
Expand Down
5 changes: 5 additions & 0 deletions src/node/consumer/src/lib/services/torrent_entries_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ export class TorrentEntriesService implements ITorrentEntriesService {
return;
}

if (fileCollection.videos.some(video => parse(torrent.title).season !== undefined && video.imdbEpisode === undefined && video.imdbSeason === undefined && video.kitsuEpisode === undefined)) {
this.logger.warn(`Unsatisfied episode and season found for ${torrent.provider} [${torrent.infoHash}] ${torrent.title} - skipping torrent`);
return;
}

const newTorrent: ITorrentCreationAttributes = ({
...torrent,
contents: fileCollection.contents,
Expand Down
Loading

0 comments on commit e24d81d

Please sign in to comment.