|
|
@ -94,6 +94,10 @@ namespace NzbDrone.Core.Parser
|
|
|
|
new Regex(@"^(?<title>.+?)(?:(?:[-_\W](?<![()\[!]))+(?<season>(?<!\d+)(?:\d{4})(?!\d+))(?:x|\Wx|_){1,2}(?<episode>\d{2,3}(?!\d+))(?:(?:\-|x|\Wx|_){1,2}(?<episode>\d{2,3}(?!\d+)))*)\W?(?!\\)",
|
|
|
|
new Regex(@"^(?<title>.+?)(?:(?:[-_\W](?<![()\[!]))+(?<season>(?<!\d+)(?:\d{4})(?!\d+))(?:x|\Wx|_){1,2}(?<episode>\d{2,3}(?!\d+))(?:(?:\-|x|\Wx|_){1,2}(?<episode>\d{2,3}(?!\d+)))*)\W?(?!\\)",
|
|
|
|
RegexOptions.IgnoreCase | RegexOptions.Compiled),
|
|
|
|
RegexOptions.IgnoreCase | RegexOptions.Compiled),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Partial season pack
|
|
|
|
|
|
|
|
new Regex(@"^(?<title>.+?)(?:\W+S(?<season>(?<!\d+)(?:\d{1,2})(?!\d+))\W+(?:(?:Part\W?|(?<!\d+\W+)e)(?<seasonpart>\d{1,2}(?!\d+)))+)",
|
|
|
|
|
|
|
|
RegexOptions.IgnoreCase | RegexOptions.Compiled),
|
|
|
|
|
|
|
|
|
|
|
|
//Mini-Series with year in title, treated as season 1, episodes are labelled as Part01, Part 01, Part.1
|
|
|
|
//Mini-Series with year in title, treated as season 1, episodes are labelled as Part01, Part 01, Part.1
|
|
|
|
new Regex(@"^(?<title>.+?\d{4})(?:\W+(?:(?:Part\W?|e)(?<episode>\d{1,2}(?!\d+)))+)",
|
|
|
|
new Regex(@"^(?<title>.+?\d{4})(?:\W+(?:(?:Part\W?|e)(?<episode>\d{1,2}(?!\d+)))+)",
|
|
|
|
RegexOptions.IgnoreCase | RegexOptions.Compiled),
|
|
|
|
RegexOptions.IgnoreCase | RegexOptions.Compiled),
|
|
|
@ -602,9 +606,21 @@ namespace NzbDrone.Core.Parser
|
|
|
|
//Todo: Set a "Extras" flag in EpisodeParseResult if we want to download them ever
|
|
|
|
//Todo: Set a "Extras" flag in EpisodeParseResult if we want to download them ever
|
|
|
|
if (!matchCollection[0].Groups["extras"].Value.IsNullOrWhiteSpace()) return null;
|
|
|
|
if (!matchCollection[0].Groups["extras"].Value.IsNullOrWhiteSpace()) return null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Partial season packs will have a seasonpart group so they can be differentiated
|
|
|
|
|
|
|
|
// from a full season/single episode release
|
|
|
|
|
|
|
|
var seasonPart = matchCollection[0].Groups["seasonpart"].Value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (seasonPart.IsNotNullOrWhiteSpace())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
result.SeasonPart = Convert.ToInt32(seasonPart);
|
|
|
|
|
|
|
|
result.IsPartialSeason = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
result.FullSeason = true;
|
|
|
|
result.FullSeason = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (result.AbsoluteEpisodeNumbers.Any() && !result.EpisodeNumbers.Any())
|
|
|
|
if (result.AbsoluteEpisodeNumbers.Any() && !result.EpisodeNumbers.Any())
|
|
|
|
{
|
|
|
|
{
|
|
|
|