mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-27 02:07:41 +00:00
Additional removals for SimpleTitleRegex added to get rid of extraneous numbers.
This commit is contained in:
parent
ac3c3386fc
commit
7a11dfd348
1 changed files with 7 additions and 2 deletions
|
@ -44,14 +44,14 @@ namespace NzbDrone.Core
|
|||
RegexOptions.IgnoreCase | RegexOptions.Compiled),
|
||||
|
||||
//Supports Season only releases
|
||||
new Regex(@"^(?<title>.*?)\W(?:S|Season\W?)?(?<season>\d{1,2}(?!\d+))+\W?(?!\\)",
|
||||
new Regex(@"^(?<title>.+?)\W(?:S|Season)\W?(?<season>\d{1,2}(?!\d+))+\W?(?!\\)",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled)
|
||||
};
|
||||
|
||||
private static readonly Regex NormalizeRegex = new Regex(@"((^|\W)(a|an|the|and|or|of)($|\W))|\W|(?:(?<=[^0-9]+)|\b)(?!(?:19\d{2}|20\d{2}))\d+(?=[^0-9ip]+|\b)",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
|
||||
private static readonly Regex SimpleTitleRegex = new Regex(@"480[i|p]|720[i|p]|1080[i|p]|[x|h]264|\<|\>|\?|\*|\:|\||""",
|
||||
private static readonly Regex SimpleTitleRegex = new Regex(@"480[i|p]|720[i|p]|1080[i|p]|[x|h|x\s|h\s]264|DD\W?5\W1|\<|\>|\?|\*|\:|\||""",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
|
||||
|
||||
|
@ -129,6 +129,11 @@ namespace NzbDrone.Core
|
|||
parsedEpisode.EpisodeNumbers.Add(i);
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
parsedEpisode.FullSeason = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue