mirror of
https://github.com/Sonarr/Sonarr
synced 2025-02-01 12:08:55 +00:00
Parse specials directly in ParsingService rather than callee.
This commit is contained in:
parent
e3be3ef91e
commit
f2c7e235af
2 changed files with 7 additions and 2 deletions
|
@ -348,10 +348,10 @@ namespace NzbDrone.Core.Parser
|
||||||
|
|
||||||
private static readonly Regex[] SpecialEpisodeTitleRegex = new Regex[]
|
private static readonly Regex[] SpecialEpisodeTitleRegex = new Regex[]
|
||||||
{
|
{
|
||||||
new Regex(@"\.S\d+E00\.(?<episodetitle>.+?)(?:\.(?:720p|1080p|HDTV|WEB|WEBRip|WEB-DL)\.|$)",
|
new Regex(@"\.S\d+E00\.(?<episodetitle>.+?)(?:\.(?:720p|1080p|2160p|HDTV|WEB|WEBRip|WEB-DL)\.|$)",
|
||||||
RegexOptions.IgnoreCase | RegexOptions.Compiled),
|
RegexOptions.IgnoreCase | RegexOptions.Compiled),
|
||||||
|
|
||||||
new Regex(@"\.S\d+\.Special\.(?<episodetitle>.+?)(?:\.(?:720p|1080p|HDTV|WEB|WEBRip|WEB-DL)\.|$)",
|
new Regex(@"\.S\d+\.Special\.(?<episodetitle>.+?)(?:\.(?:720p|1080p|2160p|HDTV|WEB|WEBRip|WEB-DL)\.|$)",
|
||||||
RegexOptions.IgnoreCase | RegexOptions.Compiled)
|
RegexOptions.IgnoreCase | RegexOptions.Compiled)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -234,6 +234,11 @@ namespace NzbDrone.Core.Parser
|
||||||
return GetAnimeEpisodes(series, parsedEpisodeInfo, mappedSeasonNumber, sceneSource, searchCriteria);
|
return GetAnimeEpisodes(series, parsedEpisodeInfo, mappedSeasonNumber, sceneSource, searchCriteria);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (parsedEpisodeInfo.IsPossibleSceneSeasonSpecial)
|
||||||
|
{
|
||||||
|
parsedEpisodeInfo = ParseSpecialEpisodeTitle(parsedEpisodeInfo, parsedEpisodeInfo.ReleaseTitle, series) ?? parsedEpisodeInfo;
|
||||||
|
}
|
||||||
|
|
||||||
return GetStandardEpisodes(series, parsedEpisodeInfo, mappedSeasonNumber, sceneSource, searchCriteria);
|
return GetStandardEpisodes(series, parsedEpisodeInfo, mappedSeasonNumber, sceneSource, searchCriteria);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue