mirror of
https://github.com/Viren070/AIOStreams.git
synced 2025-12-01 23:14:04 +01:00
fix(debrid): adjust scoring logic for file selection based on season and episode presence
This commit is contained in:
@@ -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,
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user