mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 12:02:35 +02:00
parent
0c542eeb13
commit
4f4e6c494d
@ -236,6 +236,8 @@ public void should_parse_bluray576p_quality(string title)
|
||||
[TestCase("Contract.to.Kill.2016.REMUX.1080p.BluRay.AVC.DTS-HD.MA.5.1-iFT")]
|
||||
[TestCase("27.Dresses.2008.REMUX.1080p.Bluray.AVC.DTS-HR.MA.5.1-LEGi0N")]
|
||||
[TestCase("27.Dresses.2008.BDREMUX.1080p.Bluray.AVC.DTS-HR.MA.5.1-LEGi0N")]
|
||||
[TestCase("The.Stoning.of.Soraya.M.2008.USA.BluRay.Remux.1080p.MPEG-2.DD.5.1-TDD")]
|
||||
[TestCase("Wildling.2018.1080p.BluRay.REMUX.MPEG-2.DTS-HD.MA.5.1-EPSiLON")]
|
||||
public void should_parse_remux1080p_quality(string title)
|
||||
{
|
||||
ParseAndVerifyQuality(title, Source.BLURAY, false, Resolution.R1080P, Modifier.REMUX);
|
||||
@ -344,7 +346,10 @@ public void should_parse_hardcoded_subs(string postTitle, string sub)
|
||||
private void ParseAndVerifyQuality(string title, Source source, bool proper, Resolution resolution, Modifier modifier = Modifier.NONE)
|
||||
{
|
||||
var result = QualityParser.ParseQuality(title);
|
||||
result.Resolution.Should().Be(resolution);
|
||||
if (resolution != Resolution.Unknown)
|
||||
{
|
||||
result.Resolution.Should().Be(resolution);
|
||||
}
|
||||
result.Source.Should().Be(source);
|
||||
if (modifier != Modifier.NONE)
|
||||
{
|
||||
|
@ -104,13 +104,6 @@ public static QualityModel ParseQuality(string name)
|
||||
}
|
||||
}
|
||||
|
||||
if (RawHDRegex.IsMatch(normalizedName))
|
||||
{
|
||||
result.Modifier = Modifier.RAWHD;
|
||||
result.Source = Source.TV;
|
||||
return result;
|
||||
}
|
||||
|
||||
var sourceMatch = SourceRegex.Matches(normalizedName).OfType<Match>().LastOrDefault();
|
||||
var resolution = ParseResolution(normalizedName);
|
||||
var codecRegex = CodecRegex.Match(normalizedName);
|
||||
@ -129,6 +122,13 @@ public static QualityModel ParseQuality(string name)
|
||||
result.Source = Source.BLURAY;
|
||||
return result; //We found remux!
|
||||
}
|
||||
|
||||
if (RawHDRegex.IsMatch(normalizedName) && result.Modifier != Modifier.BRDISK)
|
||||
{
|
||||
result.Modifier = Modifier.RAWHD;
|
||||
result.Source = Source.TV;
|
||||
return result;
|
||||
}
|
||||
|
||||
if (sourceMatch != null && sourceMatch.Success)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user