Always run per-episode fallback for interactive anime season search

When a user triggers an interactive season search, they expect to
see and choose from every candidate release, not just what the
decision engine approved. The early-exit on approved season results
silently removed per-episode releases from the interactive picker,
which is a regression compared to the previous behavior where
SearchAnimeSeason unconditionally ran both the season and per-episode
queries.

Automated searches still benefit from the early-exit: if the season
query returns an approved pack, we stop and avoid the per-episode
storm that caused the Nyaa/Prowlarr timeouts.

For interactive searches we also force shouldFallback to true so the
enum setting cannot accidentally hide per-episode results from the
user in the picker. The enum still gates automated search behavior.
This commit is contained in:
Oscar 2026-04-08 21:43:03 +02:00
parent ab53c8cb35
commit d4a2e95233

View file

@ -428,7 +428,9 @@ private async Task<List<DownloadDecision>> SearchAnimeSeason(Series series, List
// Only skip per-episode fallback if we got approved season results.
// Indexers like AB return all results for a title regardless of season
// params, so raw result count alone is not reliable.
if (downloadDecisions.Any(d => d.Approved))
// For interactive search, always run per-episode so the user can see
// and pick individual releases regardless of whether a pack was found.
if (!interactiveSearch && downloadDecisions.Any(d => d.Approved))
{
_logger.Debug("Season search returned approved results for {0}, skipping per-episode search for {1} episodes", series.Title, episodesToSearch.Count);
}
@ -437,14 +439,14 @@ private async Task<List<DownloadDecision>> SearchAnimeSeason(Series series, List
var fallbackSetting = _configService.AnimeSeasonSearchFallback;
var allEpisodesAired = episodesToSearch.All(e => e.AirDateUtc.HasValue && e.AirDateUtc.Value.Before(DateTime.UtcNow));
var shouldFallback = fallbackSetting switch
var shouldFallback = interactiveSearch || (fallbackSetting switch
{
AnimeSeasonSearchFallback.Never => false,
AnimeSeasonSearchFallback.Always => true,
AnimeSeasonSearchFallback.FullSeasonAired => allEpisodesAired,
AnimeSeasonSearchFallback.FullSeasonNotAired => !allEpisodesAired,
_ => !allEpisodesAired
};
});
if (shouldFallback)
{