mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-23 06:45:19 -07:00
parent
e82cf70399
commit
e78a55ac6e
2 changed files with 10 additions and 1 deletions
|
@ -281,6 +281,15 @@ namespace NzbDrone.Core.Test.ParserTests
|
||||||
QualityParser.ParseQuality(title).QualitySource.Should().Be(QualitySource.Extension);
|
QualityParser.ParseQuality(title).QualitySource.Should().Be(QualitySource.Extension);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TestCase("Movie.Title.2016.1080p.KORSUB.WEBRip.x264.AAC2.0-RADARR", "korsub")]
|
||||||
|
[TestCase("Movie.Title.2016.1080p.KORSUBS.WEBRip.x264.AAC2.0-RADARR", "korsubs")]
|
||||||
|
[TestCase("Movie.Title.2016.1080p.DKSUB.WEBRip.x264.AAC2.0-RADARR", "dksub")]
|
||||||
|
[TestCase("Movie.Title.2016.1080p.DKSUBS.WEBRip.x264.AAC2.0-RADARR", "dksubs")]
|
||||||
|
public void should_parse_hardcoded_subs(string postTitle, string sub)
|
||||||
|
{
|
||||||
|
QualityParser.ParseQuality(postTitle).HardcodedSubs.Should().Be(sub);
|
||||||
|
}
|
||||||
|
|
||||||
private void ParseAndVerifyQuality(string title, Quality quality, bool proper)
|
private void ParseAndVerifyQuality(string title, Quality quality, bool proper)
|
||||||
{
|
{
|
||||||
var result = QualityParser.ParseQuality(title);
|
var result = QualityParser.ParseQuality(title);
|
||||||
|
|
|
@ -48,7 +48,7 @@ namespace NzbDrone.Core.Parser
|
||||||
)\b",
|
)\b",
|
||||||
RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
|
RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
|
||||||
|
|
||||||
private static readonly Regex HardcodedSubsRegex = new Regex(@"\b(?<hcsub>(\w+SUB)\b)|(?<hc>(HC))\b", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
|
private static readonly Regex HardcodedSubsRegex = new Regex(@"\b(?<hcsub>(\w+SUBS?)\b)|(?<hc>(HC))\b", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
|
||||||
|
|
||||||
private static readonly Regex RawHDRegex = new Regex(@"\b(?<rawhd>RawHD|1080i[-_. ]HDTV|Raw[-_. ]HD|MPEG[-_. ]?2)\b",
|
private static readonly Regex RawHDRegex = new Regex(@"\b(?<rawhd>RawHD|1080i[-_. ]HDTV|Raw[-_. ]HD|MPEG[-_. ]?2)\b",
|
||||||
RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue