mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-17 10:45:49 +02:00
Fixed: Duplicate scene titles causes unnecessary indexer queries.
fixes #2068
This commit is contained in:
parent
126b849c27
commit
5c4dc9ccb1
@ -19,7 +19,7 @@ public abstract class SearchCriteriaBase
|
||||
public virtual bool MonitoredEpisodesOnly { get; set; }
|
||||
public virtual bool UserInvokedSearch { get; set; }
|
||||
|
||||
public List<string> QueryTitles => SceneTitles.Select(GetQueryTitle).ToList();
|
||||
public List<string> QueryTitles => SceneTitles.Select(GetQueryTitle).Distinct().ToList();
|
||||
|
||||
public static string GetQueryTitle(string title)
|
||||
{
|
||||
@ -37,4 +37,4 @@ public static string GetQueryTitle(string title)
|
||||
return cleanTitle.Trim('+', ' ');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -237,9 +237,12 @@ private List<DownloadDecision> SearchAnimeSeason(Series series, List<Episode> ep
|
||||
episodes.Select(e => e.SeasonNumber).Distinct().ToList(),
|
||||
episodes.Select(e => e.SceneSeasonNumber ?? e.SeasonNumber).Distinct().ToList());
|
||||
|
||||
spec.Episodes = episodes;
|
||||
if (!spec.SceneTitles.Contains(series.Title))
|
||||
{
|
||||
spec.SceneTitles.Add(series.Title);
|
||||
}
|
||||
|
||||
spec.SceneTitles.Add(series.Title);
|
||||
spec.Episodes = episodes;
|
||||
spec.UserInvokedSearch = userInvokedSearch;
|
||||
|
||||
return spec;
|
||||
|
Loading…
Reference in New Issue
Block a user