mirror of
https://github.com/Sonarr/Sonarr
synced 2026-05-09 05:40:53 +02:00
Parse additional reversed filename format
This commit is contained in:
parent
e0abca8360
commit
522904f53b
2 changed files with 9 additions and 2 deletions
|
|
@ -143,7 +143,14 @@ public class HashedReleaseFixture : CoreTest
|
|||
"Series Title 2019",
|
||||
Quality.WEBDL1080p,
|
||||
"NTb"
|
||||
}
|
||||
},
|
||||
new object[]
|
||||
{
|
||||
@"C:\Test\Fake.Dir.S01E01-Test\11E-20S seires.mkv".AsOsAgnostic(),
|
||||
"series",
|
||||
Quality.HDTV720p,
|
||||
null
|
||||
},
|
||||
};
|
||||
|
||||
[Test]
|
||||
|
|
|
|||
|
|
@ -510,7 +510,7 @@ public static class 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 RegexReplace NormalizeRegex = new RegexReplace(@"((?:\b|_)(?<!^)([aà](?!$)|an|the|and|or|of)(?!$)(?:\b|_))|\W|_",
|
||||
string.Empty,
|
||||
|
|
|
|||
Loading…
Reference in a new issue