Fixed: Updated check for hashed releases.

This commit is contained in:
Taloth Saldono 2014-06-25 20:44:57 +02:00
parent 1e538dc7cc
commit 34edeac391
2 changed files with 4 additions and 0 deletions

View File

@ -32,6 +32,7 @@ namespace NzbDrone.Core.Test.ParserTests
[TestCase("0e895c37245186812cb08aab1529cf8ee389dd05.mkv")]
[TestCase("08bbc153931ce3ca5fcafe1b92d3297285feb061.mkv")]
[TestCase("185d86a343e39f3341e35c4dad3ff159")]
[TestCase("ah63jka93jf0jh26ahjas961.mkv")]
public void should_not_parse_crap(string title)
{
Parser.Parser.ParseTitle(title).Should().BeNull();

View File

@ -104,6 +104,9 @@ namespace NzbDrone.Core.Parser
{
// Generic match for md5 and mixed-case hashes.
new Regex(@"^[0-9a-zA-Z]{32}", RegexOptions.Compiled),
// Generic match for shorter lower-case hashes.
new Regex(@"^[a-z0-9]{24}$", RegexOptions.Compiled),
// Format seen on some NZBGeek releases
new Regex(@"^[A-Z]{11}\d{3}$", RegexOptions.Compiled)