Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Lidarr/commit/3cdd479bb4eaacadbe7f4d532a3fad7a29736f18
You should set ROOT_URL correctly, otherwise the web may not work correctly.
2 changed files with
35 additions and
2 deletions
@ -284,11 +284,12 @@ namespace NzbDrone.Core.Providers
}
}
p rivate List < string > GetVideoFiles ( string path )
p ublic List < string > GetVideoFiles ( string path , bool allDirectories = true )
{
Logger . Debug ( "Scanning '{0}' for video files" , path ) ;
var filesOnDisk = _diskProvider . GetFiles ( path , SearchOption . AllDirectories ) ;
var searchOption = allDirectories ? SearchOption . AllDirectories : SearchOption . TopDirectoryOnly ;
var filesOnDisk = _diskProvider . GetFiles ( path , searchOption ) ;
var mediaFileList = filesOnDisk . Where ( c = > mediaExtentions . Contains ( Path . GetExtension ( c ) . ToLower ( ) ) ) . ToList ( ) ;
@ -49,6 +49,19 @@ namespace NzbDrone.Core.Providers
Logger . ErrorException ( "An error has occurred while importing folder" + subfolder , e ) ;
}
}
//Todo: Process files directly in the drop folder
foreach ( var videoFile in _diskScanProvider . GetVideoFiles ( dropFolder , false ) )
{
try
{
ProcessVideoFile ( videoFile ) ;
}
catch ( Exception ex )
{
Logger . ErrorException ( "An error has occurred while importing video file" + videoFile , ex ) ;
}
}
}
public virtual void ProcessDownload ( DirectoryInfo subfolderInfo )
@ -109,6 +122,25 @@ namespace NzbDrone.Core.Providers
}
}
public virtual void ProcessVideoFile ( string videoFile )
{
var seriesName = Parser . ParseSeriesName ( Path . GetFileNameWithoutExtension ( videoFile ) ) ;
var series = _seriesProvider . FindSeries ( seriesName ) ;
if ( series = = null )
{
Logger . Trace ( "Unknown Series on Import: {0}" , videoFile ) ;
return ;
}
var episodeFile = _diskScanProvider . ImportFile ( series , videoFile ) ;
if ( episodeFile ! = null )
{
_diskScanProvider . MoveEpisodeFile ( episodeFile , true ) ;
_metadataProvider . CreateForEpisodeFile ( episodeFile ) ;
}
}
private void TagFolder ( DirectoryInfo directory , PostDownloadStatusType status )
{
//Turning off tagging folder for now, to stop messing people's series folders.