mirror of https://github.com/lidarr/Lidarr
Fixed: Quality Parsing for VBR Fails in many cases
Fixes #258 Co-Authored-By: taloth <taloth@users.noreply.github.com>
This commit is contained in:
parent
22eb5cfc66
commit
121eb6db16
|
@ -86,6 +86,7 @@ namespace NzbDrone.Core.Test.ParserTests
|
|||
}
|
||||
|
||||
[TestCase("Sia - This Is Acting (Standard Edition) [2016-Web-MP3-V0(VBR)]", null, 0)]
|
||||
[TestCase("Mount Eerie - A Crow Looked at Me (2017) [MP3 V0 VBR)]", null, 0)]
|
||||
public void should_parse_mp3_vbr_v0_quality(string title, string desc, int bitrate)
|
||||
{
|
||||
ParseAndVerifyQuality(title, desc, bitrate, Quality.MP3_VBR);
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace NzbDrone.Core.Parser
|
|||
|
||||
private static readonly Regex SampleSizeRegex = new Regex(@"\b(?:(?<S24>24[ ]bit|24bit|[\[\(].*24bit.*[\]\)]))");
|
||||
|
||||
private static readonly Regex CodecRegex = new Regex(@"\b(?:(?<MP3VBR>MP3\S*VBR|MPEG Version 1 Audio, Layer 3 vbr)|(?<MP3CBR>MP3|MPEG Version \d+ Audio, Layer 3)|(?<FLAC>flac)|(?<ALAC>alac)|(?<WMA>WMA\d?)|(?<WAV>WAV|PCM)|(?<AAC>M4A|AAC|mp4a)|(?<OGG>OGG|Vorbis))\b",
|
||||
private static readonly Regex CodecRegex = new Regex(@"\b(?:(?<MP3VBR>MP3.*VBR|MPEG Version 1 Audio, Layer 3 vbr)|(?<MP3CBR>MP3|MPEG Version \d+ Audio, Layer 3)|(?<FLAC>flac)|(?<ALAC>alac)|(?<WMA>WMA\d?)|(?<WAV>WAV|PCM)|(?<AAC>M4A|AAC|mp4a)|(?<OGG>OGG|Vorbis))\b",
|
||||
RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
public static QualityModel ParseQuality(string name, string desc, int fileBitrate, int fileSampleSize = 0)
|
||||
|
|
Loading…
Reference in New Issue