Fixed: Parse version after quality in renamed files

Closes #7302
pull/7359/head
Mark McDowall 4 months ago committed by Mark McDowall
parent 1fcfb88d2a
commit e88f25d3bf

@ -502,6 +502,13 @@ namespace NzbDrone.Core.Test.ParserTests
result.Revision.IsRepack.Should().Be(isRepack);
}
[TestCase("[MTBB] Series Title - S02E02 - 027 - Episode Title [WEBDL-1080p v2][x264][AAC]", 2)]
public void should_be_able_to_parse_anime_version(string title, int version)
{
var result = QualityParser.ParseQuality(title);
result.Revision.Version.Should().Be(version);
}
private void ParseAndVerifyQuality(string title, Quality quality, bool proper)
{
var result = QualityParser.ParseQuality(title);

@ -40,7 +40,7 @@ namespace NzbDrone.Core.Parser
private static readonly Regex RepackRegex = new (@"\b(?<repack>repack\d?|rerip\d?)\b",
RegexOptions.Compiled | RegexOptions.IgnoreCase);
private static readonly Regex VersionRegex = new (@"\d[-._ ]?v(?<version>\d)[-._ ]|\[v(?<version>\d)\]|repack(?<version>\d)|rerip(?<version>\d)",
private static readonly Regex VersionRegex = new (@"\d[-._ ]?v(?<version>\d)[-._ ]|\[v(?<version>\d)\]|repack(?<version>\d)|rerip(?<version>\d)|(?:480|576|720|1080|2160)p[._ ]v(?<version>\d)",
RegexOptions.Compiled | RegexOptions.IgnoreCase);
private static readonly Regex RealRegex = new (@"\b(?<real>REAL)\b",

Loading…
Cancel
Save