mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-22 22:15:17 -04:00
Fixed: Skip sample check for DVD image files (iso, img, m2ts) (#4531)
* Add support for video files with non-lowercase extensions. * Fix file scan ignoring DVD image files (iso, img, vob, m2ts) Always allow DVD and Bluray file types without analysis, instead of detecting as 0 runtime. * Use extensions to detect DVD image files instead of Quality enum Add unit tests Co-authored-by: Doug Krahmer <doug.git@remhark.com>
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using NLog;
|
||||
using NzbDrone.Core.MediaFiles.MediaInfo;
|
||||
using NzbDrone.Core.Movies;
|
||||
using NzbDrone.Core.Qualities;
|
||||
|
||||
namespace NzbDrone.Core.MediaFiles.MovieImport
|
||||
{
|
||||
@@ -32,16 +34,25 @@ namespace NzbDrone.Core.MediaFiles.MovieImport
|
||||
|
||||
var extension = Path.GetExtension(path);
|
||||
|
||||
if (extension != null && extension.Equals(".flv", StringComparison.InvariantCultureIgnoreCase))
|
||||
if (extension != null)
|
||||
{
|
||||
_logger.Debug("Skipping sample check for .flv file");
|
||||
return DetectSampleResult.NotSample;
|
||||
}
|
||||
if (extension.Equals(".flv", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
_logger.Debug("Skipping sample check for .flv file");
|
||||
return DetectSampleResult.NotSample;
|
||||
}
|
||||
|
||||
if (extension != null && extension.Equals(".strm", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
_logger.Debug("Skipping sample check for .strm file");
|
||||
return DetectSampleResult.NotSample;
|
||||
if (extension.Equals(".strm", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
_logger.Debug("Skipping sample check for .strm file");
|
||||
return DetectSampleResult.NotSample;
|
||||
}
|
||||
|
||||
if (new string[] { ".iso", ".img", ".m2ts" }.Contains(extension, StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
_logger.Debug($"Skipping sample check for DVD/BR image file '{path}'");
|
||||
return DetectSampleResult.NotSample;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Use MediaInfo from the import process, no need to re-process the file again here
|
||||
|
||||
Reference in New Issue
Block a user