@ -1,8 +1,10 @@
using System ;
using System ;
using System.IO ;
using System.IO ;
using System.Linq ;
using NLog ;
using NLog ;
using NzbDrone.Core.MediaFiles.MediaInfo ;
using NzbDrone.Core.MediaFiles.MediaInfo ;
using NzbDrone.Core.Movies ;
using NzbDrone.Core.Movies ;
using NzbDrone.Core.Qualities ;
namespace NzbDrone.Core.MediaFiles.MovieImport
namespace NzbDrone.Core.MediaFiles.MovieImport
{
{
@ -32,18 +34,27 @@ namespace NzbDrone.Core.MediaFiles.MovieImport
var extension = Path . GetExtension ( path ) ;
var extension = Path . GetExtension ( path ) ;
if ( extension ! = null & & extension . Equals ( ".flv" , StringComparison . InvariantCultureIgnoreCase ) )
if ( extension ! = null )
{
if ( extension . Equals ( ".flv" , StringComparison . InvariantCultureIgnoreCase ) )
{
{
_logger . Debug ( "Skipping sample check for .flv file" ) ;
_logger . Debug ( "Skipping sample check for .flv file" ) ;
return DetectSampleResult . NotSample ;
return DetectSampleResult . NotSample ;
}
}
if ( extension ! = null & & extension . Equals ( ".strm" , StringComparison . InvariantCultureIgnoreCase ) )
if ( extension . Equals ( ".strm" , StringComparison . InvariantCultureIgnoreCase ) )
{
{
_logger . Debug ( "Skipping sample check for .strm file" ) ;
_logger . Debug ( "Skipping sample check for .strm file" ) ;
return DetectSampleResult . NotSample ;
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
// TODO: Use MediaInfo from the import process, no need to re-process the file again here
var runTime = _videoFileInfoReader . GetRunTime ( path ) ;
var runTime = _videoFileInfoReader . GetRunTime ( path ) ;