mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-14 11:23:42 +02:00
parent
4dbeb17075
commit
f9e045d14c
@ -31,6 +31,7 @@ public class CrapParserFixture : CoreTest
|
||||
[TestCase("ah63jka93jf0jh26ahjas961.mkv")]
|
||||
[TestCase("qrdSD3rYzWb7cPdVIGSn4E7")]
|
||||
[TestCase("QZC4HDl7ncmzyUj9amucWe1ddKU1oFMZDd8r0dEDUsTd")]
|
||||
[TestCase("abc.xyz.af6021c37f7852")]
|
||||
public void should_not_parse_crap(string title)
|
||||
{
|
||||
Parser.Parser.ParseTitle(title).Should().BeNull();
|
||||
|
@ -108,6 +108,13 @@ public class HashedReleaseFixture : CoreTest
|
||||
"Droned",
|
||||
Quality.HDTV720p,
|
||||
null
|
||||
},
|
||||
new object[]
|
||||
{
|
||||
@"C:\Test\Series.Title.S02E24.720p.HDTV.H.264\abc.xyz.af6021c37f7852.mkv".AsOsAgnostic(),
|
||||
"Series Title",
|
||||
Quality.HDTV720p,
|
||||
null
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -258,7 +258,7 @@ public static class Parser
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled),
|
||||
|
||||
//Supports 1103/1113 naming
|
||||
new Regex(@"^(?<title>.+?)?(?:(?:[-_\W](?<![()\[!]))*(?<season>(?<!\d+|\(|\[|e|x)\d{2})(?<episode>(?<!e|x)\d{2}(?!p|i|\d+|\)|\]|\W\d+|\W(?:e|ep|x)\d+)))+(\W+|_|$)(?!\\)",
|
||||
new Regex(@"^(?<title>.+?)?(?:(?:[-_. ](?<![()\[!]))*(?<season>(?<!\d+|\(|\[|e|x)\d{2})(?<episode>(?<!e|x)\d{2}(?!p|i|\d+|\)|\]|\W\d+|\W(?:e|ep|x)\d+)))+([-_. ]+|$)(?!\\)",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled),
|
||||
|
||||
//Episodes with single digit episode number (S01E1, S01E5E6, etc)
|
||||
@ -334,6 +334,9 @@ public static class Parser
|
||||
//abc - Started appearing January 2015
|
||||
new Regex(@"^abc$", RegexOptions.Compiled | RegexOptions.IgnoreCase),
|
||||
|
||||
//abc - Started appearing 2020
|
||||
new Regex(@"^abc[-_. ]xyz", RegexOptions.Compiled | RegexOptions.IgnoreCase),
|
||||
|
||||
//b00bs - Started appearing January 2015
|
||||
new Regex(@"^b00bs$", RegexOptions.Compiled | RegexOptions.IgnoreCase),
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user