Fix recognition of 4k Movies upon import.

pull/2/head
Leonardo Galli 8 years ago
parent 47083e6be1
commit c6912a193c

@ -128,7 +128,48 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport
var current = localMovie.Quality; var current = localMovie.Quality;
var qualityName = current.Quality.Name.ToLower(); var qualityName = current.Quality.Name.ToLower();
QualityModel updated = null; QualityModel updated = null;
if (width > 1400) if (width > 2000)
{
if (qualityName.Contains("bluray"))
{
updated = new QualityModel(Quality.Bluray2160p);
}
else if (qualityName.Contains("webdl"))
{
updated = new QualityModel(Quality.WEBDL2160p);
}
else if (qualityName.Contains("hdtv"))
{
updated = new QualityModel(Quality.HDTV2160p);
}
else
{
var def = _qualitiesService.Get(Quality.HDTV2160p);
if (localMovie.Size > def.MinSize && def.MaxSize > localMovie.Size)
{
updated = new QualityModel(Quality.HDTV2160p);
}
def = _qualitiesService.Get(Quality.WEBDL2160p);
if (localMovie.Size > def.MinSize && def.MaxSize > localMovie.Size)
{
updated = new QualityModel(Quality.WEBDL2160p);
}
def = _qualitiesService.Get(Quality.Bluray2160p);
if (localMovie.Size > def.MinSize && def.MaxSize > localMovie.Size)
{
updated = new QualityModel(Quality.Bluray2160p);
}
if (updated == null)
{
updated = new QualityModel(Quality.Bluray2160p);
}
}
}
else if (width > 1400)
{ {
if (qualityName.Contains("bluray")) if (qualityName.Contains("bluray"))
{ {
@ -147,7 +188,6 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport
else else
{ {
var def = _qualitiesService.Get(Quality.HDTV1080p); var def = _qualitiesService.Get(Quality.HDTV1080p);
if (localMovie.Size > def.MinSize && def.MaxSize > localMovie.Size) if (localMovie.Size > def.MinSize && def.MaxSize > localMovie.Size)
{ {

Loading…
Cancel
Save