Fixed: Handle obfuscated files using abc.xyz pattern

Closes #3990
pull/3980/head
Mark McDowall 4 years ago
parent 4dbeb17075
commit f9e045d14c

@ -31,6 +31,7 @@ namespace NzbDrone.Core.Test.ParserTests
[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 @@ namespace NzbDrone.Core.Test.ParserTests
"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 @@ namespace NzbDrone.Core.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 @@ namespace NzbDrone.Core.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…
Cancel
Save