Tweaked reverse title detection to handle triple digit episode numbers.
fixes #2871
This commit is contained in:
parent
ce59db528b
commit
04900e5f90
|
@ -87,6 +87,13 @@ namespace NzbDrone.Core.Test.ParserTests
|
||||||
"Fargo",
|
"Fargo",
|
||||||
Quality.WEBDL1080p,
|
Quality.WEBDL1080p,
|
||||||
"RARBG"
|
"RARBG"
|
||||||
|
},
|
||||||
|
new object[]
|
||||||
|
{
|
||||||
|
@"C:\Test\XxQVHK4GJMP3n2dLpmhW\XxQVHK4GJMP3n2dLpmhW\MKV\010E70S.yhcranA.fo.snoS.mkv".AsOsAgnostic(),
|
||||||
|
"Sons of Anarchy",
|
||||||
|
Quality.HDTV720p,
|
||||||
|
""
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -290,7 +290,7 @@ namespace NzbDrone.Core.Parser
|
||||||
};
|
};
|
||||||
|
|
||||||
//Regex to detect whether the title was reversed.
|
//Regex to detect whether the title was reversed.
|
||||||
private static readonly Regex ReversedTitleRegex = new Regex(@"[-._ ](p027|p0801|\d{2}E\d{2}S)[-._ ]", RegexOptions.Compiled);
|
private static readonly Regex ReversedTitleRegex = new Regex(@"[-._ ](p027|p0801|\d{2,3}E\d{2}S)[-._ ]", RegexOptions.Compiled);
|
||||||
|
|
||||||
private static readonly Regex NormalizeRegex = new Regex(@"((?:\b|_)(?<!^)(a(?!$)|an|the|and|or|of)(?:\b|_))|\W|_",
|
private static readonly Regex NormalizeRegex = new Regex(@"((?:\b|_)(?<!^)(a(?!$)|an|the|and|or|of)(?:\b|_))|\W|_",
|
||||||
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||||
|
|
Loading…
Reference in New Issue