Skip to content

Commit f2c7e23

Browse files
committed
Parse specials directly in ParsingService rather than callee.
1 parent e3be3ef commit f2c7e23

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/NzbDrone.Core/Parser/Parser.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,10 +348,10 @@ public static class Parser
348348

349349
private static readonly Regex[] SpecialEpisodeTitleRegex = new Regex[]
350350
{
351-
new Regex(@"\.S\d+E00\.(?<episodetitle>.+?)(?:\.(?:720p|1080p|HDTV|WEB|WEBRip|WEB-DL)\.|$)",
351+
new Regex(@"\.S\d+E00\.(?<episodetitle>.+?)(?:\.(?:720p|1080p|2160p|HDTV|WEB|WEBRip|WEB-DL)\.|$)",
352352
RegexOptions.IgnoreCase | RegexOptions.Compiled),
353353

354-
new Regex(@"\.S\d+\.Special\.(?<episodetitle>.+?)(?:\.(?:720p|1080p|HDTV|WEB|WEBRip|WEB-DL)\.|$)",
354+
new Regex(@"\.S\d+\.Special\.(?<episodetitle>.+?)(?:\.(?:720p|1080p|2160p|HDTV|WEB|WEBRip|WEB-DL)\.|$)",
355355
RegexOptions.IgnoreCase | RegexOptions.Compiled)
356356
};
357357

src/NzbDrone.Core/Parser/ParsingService.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,11 @@ private List<Episode> GetEpisodes(ParsedEpisodeInfo parsedEpisodeInfo, Series se
234234
return GetAnimeEpisodes(series, parsedEpisodeInfo, mappedSeasonNumber, sceneSource, searchCriteria);
235235
}
236236

237+
if (parsedEpisodeInfo.IsPossibleSceneSeasonSpecial)
238+
{
239+
parsedEpisodeInfo = ParseSpecialEpisodeTitle(parsedEpisodeInfo, parsedEpisodeInfo.ReleaseTitle, series) ?? parsedEpisodeInfo;
240+
}
241+
237242
return GetStandardEpisodes(series, parsedEpisodeInfo, mappedSeasonNumber, sceneSource, searchCriteria);
238243
}
239244

0 commit comments

Comments
 (0)