Fixed: Specials not allowing multi-episode select in Manual Import

Closes #6429
This commit is contained in:
Mark McDowall 2024-01-26 21:01:36 -08:00 committed by Mark McDowall
parent d9acbf5682
commit e9f0c96249
1 changed files with 7 additions and 1 deletions

View File

@ -298,14 +298,20 @@ function InteractiveImportModalContent(
return acc;
}
const lastSelectedSeason = acc.lastSelectedSeason;
acc.seasonSelectDisabled ||= !item.series;
acc.episodeSelectDisabled ||= !item.seasonNumber;
acc.episodeSelectDisabled ||=
item.seasonNumber === undefined ||
(lastSelectedSeason >= 0 && item.seasonNumber !== lastSelectedSeason);
acc.lastSelectedSeason = item.seasonNumber ?? -1;
return acc;
},
{
seasonSelectDisabled: false,
episodeSelectDisabled: false,
lastSelectedSeason: -1,
}
);