1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-09 04:22:30 +01:00

Fix issue where 1080p Telesyncs get tagged as 1080p Blurays.

This commit is contained in:
Leonardo Galli 2017-03-13 18:22:51 +01:00
parent e525f23281
commit 5d3750a295

View File

@ -135,16 +135,16 @@ private ImportDecision GetDecision(string file, Movie movie, ParsedMovieInfo fol
localMovie.Size = _diskProvider.GetFileSize(file); localMovie.Size = _diskProvider.GetFileSize(file);
_logger.Debug("Size: {0}", localMovie.Size); _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 //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); localMovie.MediaInfo = _videoFileInfoReader.GetMediaInfo(file);
if (shouldCheckQuality) if (shouldCheckQuality)
{ {
_logger.Debug("Checking quality for this video file to make sure nothing mismatched."); _logger.Debug("Checking quality for this video file to make sure nothing mismatched.");
var width = localMovie.MediaInfo.Width; var width = localMovie.MediaInfo.Width;
var current = localMovie.Quality;
var qualityName = current.Quality.Name.ToLower(); var qualityName = current.Quality.Name.ToLower();
QualityModel updated = null; QualityModel updated = null;
if (width > 2000) if (width > 2000)
@ -565,5 +565,20 @@ private bool UseFolderQuality(ParsedEpisodeInfo folderInfo, QualityModel fileQua
return false; return false;
} }
private bool ShouldCheckQualityForParsedQuality(Quality quality)
{
List<Quality> shouldNotCheck = new List<Quality> { 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;
}
} }
} }