diff --git a/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs index d2a0b1858..f2e6039c6 100644 --- a/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs @@ -126,6 +126,9 @@ public void should_parse_flac_quality(string title, string desc, int bitrate) [TestCase("Green_Day-Father_Of_All-24-44-WEB-FLAC-2020-OBZEN", null, 0, 0)] [TestCase("", "Flac Audio", 5057, 24)] [TestCase("[TR24][OF] Good Charlotte - Generation Rx - 2018 (Pop-Punk | Alternative Rock)", null, 0, 0)] + [TestCase("Green Day - Father Of All [FLAC (M4A) 24-bit Lossless]", null, 0, 0)] + [TestCase("Green_Day-Father_Of_All_FLAC_M4A_24_bit_Lossless", null, 0, 0)] + [TestCase("Green.Day-Father.Of.All.FLAC.M4A.24.bit.Lossless", null, 0, 0)] public void should_parse_flac_24bit_quality(string title, string desc, int bitrate, int sampleSize) { ParseAndVerifyQuality(title, desc, bitrate, Quality.FLAC_24, sampleSize); diff --git a/src/NzbDrone.Core/Parser/QualityParser.cs b/src/NzbDrone.Core/Parser/QualityParser.cs index 9b3c2d6c9..32b7e7542 100644 --- a/src/NzbDrone.Core/Parser/QualityParser.cs +++ b/src/NzbDrone.Core/Parser/QualityParser.cs @@ -36,7 +36,7 @@ public class QualityParser (?V2[ ]?kbps|V2|[\[\(].*V2.*[\]\)]))\b", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace); - private static readonly Regex SampleSizeRegex = new (@"\b(?:(?24[ ]?bit|tr24|24-(?:44|48|96|192)|[\[\(].*24bit.*[\]\)]))\b", RegexOptions.Compiled); + private static readonly Regex SampleSizeRegex = new (@"\b(?:(?24[-._ ]?bit|tr24|24-(?:44|48|96|192)|[\[\(].*24bit.*[\]\)]))\b", RegexOptions.Compiled); private static readonly Regex CodecRegex = new (@"\b(?:(?MPEG Version \d(.5)? Audio, Layer 1|MP1)|(?MPEG Version \d(.5)? Audio, Layer 2|MP2)|(?MP3.*VBR|MPEG Version \d(.5)? Audio, Layer 3 vbr)|(?MP3|MPEG Version \d(.5)? Audio, Layer 3)|(?(web)?flac|TR24)|(?wavpack|wv)|(?alac)|(?WMA\d?)|(?WAV|PCM)|(?M4A|M4P|M4B|AAC|mp4a|MPEG-4 Audio(?!.*alac))|(?OGG|OGA|Vorbis))\b|(?monkey's audio|[\[|\(].*\bape\b.*[\]|\)])|(?Opus Version \d(.5)? Audio|[\[|\(].*\bopus\b.*[\]|\)])", RegexOptions.Compiled | RegexOptions.IgnoreCase);