From 5d3750a295a1661df3ebdbf19cfc9d8bd5a85fd2 Mon Sep 17 00:00:00 2001 From: Leonardo Galli Date: Mon, 13 Mar 2017 18:22:51 +0100 Subject: [PATCH] Fix issue where 1080p Telesyncs get tagged as 1080p Blurays. --- .../EpisodeImport/ImportDecisionMaker.cs | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/NzbDrone.Core/MediaFiles/EpisodeImport/ImportDecisionMaker.cs b/src/NzbDrone.Core/MediaFiles/EpisodeImport/ImportDecisionMaker.cs index 88cf586d7..e9895e542 100644 --- a/src/NzbDrone.Core/MediaFiles/EpisodeImport/ImportDecisionMaker.cs +++ b/src/NzbDrone.Core/MediaFiles/EpisodeImport/ImportDecisionMaker.cs @@ -135,16 +135,16 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport localMovie.Size = _diskProvider.GetFileSize(file); _logger.Debug("Size: {0}", localMovie.Size); - + var current = localMovie.Quality; //TODO: make it so media info doesn't ruin the import process of a new series - if (sceneSource) + if (sceneSource && ShouldCheckQualityForParsedQuality(current.Quality)) { localMovie.MediaInfo = _videoFileInfoReader.GetMediaInfo(file); if (shouldCheckQuality) { _logger.Debug("Checking quality for this video file to make sure nothing mismatched."); var width = localMovie.MediaInfo.Width; - var current = localMovie.Quality; + var qualityName = current.Quality.Name.ToLower(); QualityModel updated = null; if (width > 2000) @@ -565,5 +565,20 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport return false; } + + private bool ShouldCheckQualityForParsedQuality(Quality quality) + { + List shouldNotCheck = new List { Quality.WORKPRINT, Quality.TELECINE, Quality.TELESYNC, + Quality.DVDSCR, Quality.DVD, Quality.CAM, Quality.DVDR, Quality.Remux1080p, Quality.Remux2160p, Quality.REGIONAL + }; + + if (shouldNotCheck.Contains(quality)) + { + return false; + + } + + return true; + } } }