mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-25 17:27:18 +00:00
Tweaked reverse title detection to handle triple digit episode numbers.
fixes #2871
This commit is contained in:
parent
ce59db528b
commit
04900e5f90
2 changed files with 8 additions and 1 deletions
|
@ -87,6 +87,13 @@ namespace NzbDrone.Core.Test.ParserTests
|
|||
"Fargo",
|
||||
Quality.WEBDL1080p,
|
||||
"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.
|
||||
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|_",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
|
|
Loading…
Reference in a new issue