mirror of
https://github.com/lidarr/Lidarr
synced 2025-01-03 13:34:54 +00:00
Fixed: Ignore repack version for MP3 V0/V2 VBR
This commit is contained in:
parent
9e8b9bd38c
commit
e6e50c8784
2 changed files with 10 additions and 4 deletions
|
@ -310,9 +310,15 @@ public void should_parse_null_quality_description_as_unknown()
|
|||
[TestCase("Artist Title - Album Title 2017 REPACK FLAC aAF", true, 2)]
|
||||
[TestCase("Artist.Title-Album.Title.2017.REPACK.FLAC-aAF", true, 2)]
|
||||
[TestCase("Artist.Title-Album.Title.2017.REPACK2.FLAC-aAF", true, 3)]
|
||||
[TestCase("Artist Title - Album Title 2017 RERIP FLAC aAF", true, 2)]
|
||||
[TestCase("Artist Title - Album Title 2017 RERIP2 FLAC aAF", true, 3)]
|
||||
[TestCase("Artist Title - Album Title 2017 PROPER FLAC aAF", false, 2)]
|
||||
[TestCase("Artist.Title-Album.Title.2017.PROPER.FLAC-aAF", false, 2)]
|
||||
[TestCase("Artist.Title-Album.Title.2017.RERIP.FLAC-DEMAND", true, 2)]
|
||||
[TestCase("Artist.Title-Album.Title.2017.RERIP2.FLAC-DEMAND", true, 3)]
|
||||
[TestCase("Artist Title - Album Title 2017 MP3 V2 (VBR) aAF", false, 1)]
|
||||
[TestCase("Artist.Title-Album.Title.2017.MP3.V2.VBR-aAF", false, 1)]
|
||||
[TestCase("Artist.Title-Album.Title.2017.MP3.V2.VBR-aAF", false, 1)]
|
||||
[TestCase("Artist.Title-Album.Title.2017.MP3.V2.VBR-aAF", false, 1)]
|
||||
[TestCase("Artist.Title-Album.Title.2017.MP3.V2.VBR-DEMAND", false, 1)]
|
||||
[TestCase("Artist.Title-Album.Title.2017.MP3.V2.VBR-DEMAND", false, 1)]
|
||||
public void should_be_able_to_parse_repack(string title, bool isRepack, int version)
|
||||
{
|
||||
var result = QualityParser.ParseQuality(title, null, 0);
|
||||
|
|
|
@ -18,7 +18,7 @@ public class QualityParser
|
|||
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(?<!\bMP3\b))[-._ ]?v(?<version>\d)[-._ ]|\[v(?<version>\d)\]|repack(?<version>\d)|rerip(?<version>\d)",
|
||||
RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
private static readonly Regex RealRegex = new (@"\b(?<real>REAL)\b",
|
||||
|
|
Loading…
Reference in a new issue