Fixed: Additional reverse title parser patterns.

fixes #2943
This commit is contained in:
Taloth Saldono 2019-02-07 12:52:18 +01:00
parent b319cb9525
commit f215ba9bac
2 changed files with 15 additions and 1 deletions

View File

@ -94,6 +94,20 @@ namespace NzbDrone.Core.Test.ParserTests
"Sons of Anarchy",
Quality.HDTV720p,
null
},
new object[]
{
@"50E50S.denorD.mkv".AsOsAgnostic(),
"Droned",
Quality.HDTV720p,
null
},
new object[]
{
@"C:\Test\XxQVHK4GJMP3n2dLpmhW\XxQVHK4GJMP3n2dLpmhW\50E50S.denorD.mkv".AsOsAgnostic(),
"Droned",
Quality.HDTV720p,
null
}
};

View File

@ -299,7 +299,7 @@ namespace NzbDrone.Core.Parser
};
//Regex to detect whether the title was reversed.
private static readonly Regex ReversedTitleRegex = new Regex(@"[-._ ](p027|p0801|\d{2,3}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);