Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Radarr/commit/3a7b1741d98f70c4bee13e2ec502dc03be942ab6
You should set ROOT_URL correctly, otherwise the web may not work correctly.
3 changed files with
53 additions and
12 deletions
@ -61,6 +61,36 @@ namespace NzbDrone.Core.Test.MediaFiles.MovieImport
Mocker . GetMock < IVideoFileInfoReader > ( ) . Verify ( c = > c . GetRunTime ( It . IsAny < string > ( ) ) , Times . Never ( ) ) ;
}
[Test]
public void should_return_false_for_iso ( )
{
_localMovie . Path = @"C:\Test\some movie (2000).iso" ;
ShouldBeNotSample ( ) ;
Mocker . GetMock < IVideoFileInfoReader > ( ) . Verify ( c = > c . GetRunTime ( It . IsAny < string > ( ) ) , Times . Never ( ) ) ;
}
[Test]
public void should_return_false_for_img ( )
{
_localMovie . Path = @"C:\Test\some movie (2000).img" ;
ShouldBeNotSample ( ) ;
Mocker . GetMock < IVideoFileInfoReader > ( ) . Verify ( c = > c . GetRunTime ( It . IsAny < string > ( ) ) , Times . Never ( ) ) ;
}
[Test]
public void should_return_false_for_m2ts ( )
{
_localMovie . Path = @"C:\Test\some movie (2000).m2ts" ;
ShouldBeNotSample ( ) ;
Mocker . GetMock < IVideoFileInfoReader > ( ) . Verify ( c = > c . GetRunTime ( It . IsAny < string > ( ) ) , Times . Never ( ) ) ;
}
[Test]
public void should_use_runtime ( )
{
@ -10,7 +10,7 @@ namespace NzbDrone.Core.MediaFiles
static MediaFileExtensions ( )
{
_fileExtensions = new Dictionary < string , Quality >
_fileExtensions = new Dictionary < string , Quality > ( StringComparer . OrdinalIgnoreCase )
{
//Unknown
{ ".webm" , Quality . Unknown } ,
@ -75,9 +75,9 @@ namespace NzbDrone.Core.MediaFiles
public static Quality GetQualityForExtension ( string extension )
{
if ( _fileExtensions . ContainsKey( extension ) )
if ( _fileExtensions . TryGetValue( extension , out var quality ) )
{
return _fileExtensions[ extension ] ;
return quality ;
}
return Quality . Unknown ;
@ -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 ! = null & & extension . Equals ( ".strm" , StringComparison . InvariantCultureIgnoreCase ) )
{
_logger . Debug ( "Skipping sample check for .strm file" ) ;
return DetectSampleResult . NotSample ;
if ( extension . Equals ( ".flv" , StringComparison . InvariantCultureIgnoreCase ) )
{
_logger . Debug ( "Skipping sample check for .flv 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