@@ -12,19 +12,19 @@ public class QualityParser
12
12
{
13
13
private static readonly Logger Logger = NzbDroneLogger . GetLogger ( typeof ( QualityParser ) ) ;
14
14
15
- private static readonly Regex ProperRegex = new Regex ( @"\b(?<proper>proper)\b" ,
15
+ private static readonly Regex ProperRegex = new ( @"\b(?<proper>proper)\b" ,
16
16
RegexOptions . Compiled | RegexOptions . IgnoreCase ) ;
17
17
18
- private static readonly Regex RepackRegex = new Regex ( @"\b(?<repack>repack\d?|rerip\d?)\b" ,
18
+ private static readonly Regex RepackRegex = new ( @"\b(?<repack>repack\d?|rerip\d?)\b" ,
19
19
RegexOptions . Compiled | RegexOptions . IgnoreCase ) ;
20
20
21
- private static readonly Regex VersionRegex = new Regex ( @"\d[-._ ]?v(?<version>\d)[-._ ]|\[v(?<version>\d)\]|repack(?<version>\d)|rerip(?<version>\d)" ,
21
+ private static readonly Regex VersionRegex = new ( @"\d[-._ ]?v(?<version>\d)[-._ ]|\[v(?<version>\d)\]|repack(?<version>\d)|rerip(?<version>\d)" ,
22
22
RegexOptions . Compiled | RegexOptions . IgnoreCase ) ;
23
23
24
- private static readonly Regex RealRegex = new Regex ( @"\b(?<real>REAL)\b" ,
24
+ private static readonly Regex RealRegex = new ( @"\b(?<real>REAL)\b" ,
25
25
RegexOptions . Compiled ) ;
26
26
27
- private static readonly Regex BitRateRegex = new Regex ( @"\b(?:(?<B096>96[ ]?kbps|96|[\[\(].*96.*[\]\)])|
27
+ private static readonly Regex BitRateRegex = new ( @"\b(?:(?<B096>96[ ]?kbps|96|[\[\(].*96.*[\]\)])|
28
28
(?<B128>128[ ]?kbps|128|[\[\(].*128.*[\]\)])|
29
29
(?<B160>160[ ]?kbps|160|[\[\(].*160.*[\]\)]|q5)|
30
30
(?<B192>192[ ]?kbps|192|[\[\(].*192.*[\]\)]|q6)|
@@ -36,12 +36,12 @@ public class QualityParser
36
36
(?<VBRV2>V2[ ]?kbps|V2|[\[\(].*V2.*[\]\)]))\b" ,
37
37
RegexOptions . Compiled | RegexOptions . IgnoreCase | RegexOptions . IgnorePatternWhitespace ) ;
38
38
39
- private static readonly Regex SampleSizeRegex = new Regex ( @"\b(?:(?<S24>24[ ]?bit|tr24|24-(?:44|48|96|192)|[\[\(].*24bit.*[\]\)]))\b" , RegexOptions . Compiled ) ;
39
+ private static readonly Regex SampleSizeRegex = new ( @"\b(?:(?<S24>24[ ]?bit|tr24|24-(?:44|48|96|192)|[\[\(].*24bit.*[\]\)]))\b" , RegexOptions . Compiled ) ;
40
40
41
- private static readonly Regex CodecRegex = new Regex ( @"\b(?:(?<MP1>MPEG Version \d(.5)? Audio, Layer 1|MP1)|(?<MP2>MPEG Version \d(.5)? Audio, Layer 2|MP2)|(?<MP3VBR>MP3.*VBR|MPEG Version \d(.5)? Audio, Layer 3 vbr)|(?<MP3CBR>MP3|MPEG Version \d(.5)? Audio, Layer 3)|(?<FLAC>(web)?flac|TR24)|(?<WAVPACK>wavpack|wv)|(?<ALAC>alac)|(?<WMA>WMA\d?)|(?<WAV>WAV|PCM)|(?<AAC>M4A|M4P|M4B|AAC|mp4a|MPEG-4 Audio(?!.*alac))|(?<OGG>OGG|OGA|Vorbis))\b|(?<APE>monkey's audio|[\[|\(].*\bape\b.*[\]|\)])|(?<OPUS>Opus Version \d(.5)? Audio|[\[|\(].*\bopus\b.*[\]|\)])" ,
41
+ private static readonly Regex CodecRegex = new ( @"\b(?:(?<MP1>MPEG Version \d(.5)? Audio, Layer 1|MP1)|(?<MP2>MPEG Version \d(.5)? Audio, Layer 2|MP2)|(?<MP3VBR>MP3.*VBR|MPEG Version \d(.5)? Audio, Layer 3 vbr)|(?<MP3CBR>MP3|MPEG Version \d(.5)? Audio, Layer 3)|(?<FLAC>(web)?flac|TR24)|(?<WAVPACK>wavpack|wv)|(?<ALAC>alac)|(?<WMA>WMA\d?)|(?<WAV>WAV|PCM)|(?<AAC>M4A|M4P|M4B|AAC|mp4a|MPEG-4 Audio(?!.*alac))|(?<OGG>OGG|OGA|Vorbis))\b|(?<APE>monkey's audio|[\[|\(].*\bape\b.*[\]|\)])|(?<OPUS>Opus Version \d(.5)? Audio|[\[|\(].*\bopus\b.*[\]|\)])" ,
42
42
RegexOptions . Compiled | RegexOptions . IgnoreCase ) ;
43
43
44
- private static readonly Regex WebRegex = new Regex ( @"\b(?<web>WEB)(?:\b|$|[ .])" ,
44
+ private static readonly Regex WebRegex = new ( @"\b(?<web>WEB)(?:\b|$|[ .])" ,
45
45
RegexOptions . Compiled | RegexOptions . IgnoreCase ) ;
46
46
47
47
public static QualityModel ParseQuality ( string name , string desc , int fileBitrate , int fileSampleSize = 0 )
0 commit comments