Fixed: Additional reverse title parser patterns.

fixes #2943
pull/2935/head
Taloth Saldono 6 years ago
parent b319cb9525
commit f215ba9bac

@ -94,6 +94,20 @@ namespace NzbDrone.Core.Test.ParserTests
"Sons of Anarchy", "Sons of Anarchy",
Quality.HDTV720p, Quality.HDTV720p,
null 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
} }
}; };

@ -299,7 +299,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,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|_", 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…
Cancel
Save