diff --git a/packages/core/src/debrid/utils.ts b/packages/core/src/debrid/utils.ts index 3472b82b..ad111625 100644 --- a/packages/core/src/debrid/utils.ts +++ b/packages/core/src/debrid/utils.ts @@ -202,9 +202,19 @@ export async function selectFileInTorrentOrNZB( if (parsed && !isSeasonWrong(parsed, metadata)) { score += 500; } + if (!parsed?.seasons?.length && metadata?.season) { + score -= 500; + } + if (parsed && !isEpisodeWrong(parsed, metadata)) { score += 500; } + if ( + !parsed?.episodes?.length && + (metadata?.episode || metadata?.absoluteEpisode) + ) { + score -= 500; + } // Title matching (third priority) if (parsed && !isTitleWrong(parsed, metadata)) { @@ -230,7 +240,7 @@ export async function selectFileInTorrentOrNZB( } return { file, - score, + score: Math.max(score, 0), index, }; });