Fixed: Duplicate scene titles causes unnecessary indexer queries.
fixes #2068
This commit is contained in:
parent
126b849c27
commit
5c4dc9ccb1
|
@ -19,7 +19,7 @@ namespace NzbDrone.Core.IndexerSearch.Definitions
|
||||||
public virtual bool MonitoredEpisodesOnly { get; set; }
|
public virtual bool MonitoredEpisodesOnly { get; set; }
|
||||||
public virtual bool UserInvokedSearch { 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)
|
public static string GetQueryTitle(string title)
|
||||||
{
|
{
|
||||||
|
|
|
@ -237,9 +237,12 @@ namespace NzbDrone.Core.IndexerSearch
|
||||||
episodes.Select(e => e.SeasonNumber).Distinct().ToList(),
|
episodes.Select(e => e.SeasonNumber).Distinct().ToList(),
|
||||||
episodes.Select(e => e.SceneSeasonNumber ?? 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;
|
spec.UserInvokedSearch = userInvokedSearch;
|
||||||
|
|
||||||
return spec;
|
return spec;
|
||||||
|
|
Loading…
Reference in New Issue