mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-10-30 15:32:31 +01:00
Fixed: Added additional separators to reversed title detection.
This commit is contained in:
parent
457e585300
commit
9e9cb98b3a
@ -26,12 +26,19 @@ namespace NzbDrone.Core.Test.ParserTests
|
||||
},
|
||||
new object[]
|
||||
{
|
||||
@"C:\Test\Some.Hashed.Release.S01E01.720p.WEB-DL.AAC2.0.H.264-Mercury.mkv\yrucreM-462.H.0.2CAA.LD-BEW.p027.10E10S.esaeleR.dehsaH.emoS.mkv".AsOsAgnostic(),
|
||||
@"C:\Test\Fake.Dir.S01E01-Test\yrucreM-462.H.0.2CAA.LD-BEW.p027.10E10S.esaeleR.dehsaH.emoS.mkv".AsOsAgnostic(),
|
||||
"somehashedrelease",
|
||||
"WEBDL-720p",
|
||||
"Mercury"
|
||||
},
|
||||
new object[]
|
||||
{
|
||||
@"C:\Test\Fake.Dir.S01E01-Test\yrucreM-LN 1.5DD LD-BEW P0801 10E10S esaeleR dehsaH emoS.mkv".AsOsAgnostic(),
|
||||
"somehashedrelease",
|
||||
"WEBDL-1080p",
|
||||
"Mercury"
|
||||
},
|
||||
new object[]
|
||||
{
|
||||
@"C:\Test\Weeds.S01E10.DVDRip.XviD-NZBgeek\AHFMZXGHEWD660.mkv".AsOsAgnostic(),
|
||||
"weeds",
|
||||
|
@ -121,7 +121,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}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 New Issue
Block a user