@ -23,7 +23,7 @@ namespace NzbDrone.Core.MediaFiles.BookImport.Manual
{
{
public interface IManualImportService
public interface IManualImportService
{
{
List < ManualImportItem > GetMediaFiles ( string path , string downloadId , FilterFilesType filter , bool replaceExistingFiles ) ;
List < ManualImportItem > GetMediaFiles ( string path , string downloadId , Author author , FilterFilesType filter , bool replaceExistingFiles ) ;
List < ManualImportItem > UpdateItems ( List < ManualImportItem > item ) ;
List < ManualImportItem > UpdateItems ( List < ManualImportItem > item ) ;
}
}
@ -72,7 +72,7 @@ namespace NzbDrone.Core.MediaFiles.BookImport.Manual
_logger = logger ;
_logger = logger ;
}
}
public List < ManualImportItem > GetMediaFiles ( string path , string downloadId , FilterFilesType filter , bool replaceExistingFiles )
public List < ManualImportItem > GetMediaFiles ( string path , string downloadId , Author author , FilterFilesType filter , bool replaceExistingFiles )
{
{
if ( downloadId . IsNotNullOrWhiteSpace ( ) )
if ( downloadId . IsNotNullOrWhiteSpace ( ) )
{
{
@ -110,14 +110,14 @@ namespace NzbDrone.Core.MediaFiles.BookImport.Manual
return new List < ManualImportItem > { result } ;
return new List < ManualImportItem > { result } ;
}
}
return ProcessFolder ( path , downloadId , filter, replaceExistingFiles ) ;
return ProcessFolder ( path , downloadId , author, filter, replaceExistingFiles ) ;
}
}
private List < ManualImportItem > ProcessFolder ( string folder , string downloadId , FilterFilesType filter , bool replaceExistingFiles )
private List < ManualImportItem > ProcessFolder ( string folder , string downloadId , Author author , FilterFilesType filter , bool replaceExistingFiles )
{
{
DownloadClientItem downloadClientItem = null ;
DownloadClientItem downloadClientItem = null ;
var directoryInfo = new DirectoryInfo ( folder ) ;
var directoryInfo = new DirectoryInfo ( folder ) ;
var author = _parsingService . GetArtist ( directoryInfo . Name ) ;
author = author ? ? _parsingService . GetArtist ( directoryInfo . Name ) ;
if ( downloadId . IsNotNullOrWhiteSpace ( ) )
if ( downloadId . IsNotNullOrWhiteSpace ( ) )
{
{
@ -181,7 +181,7 @@ namespace NzbDrone.Core.MediaFiles.BookImport.Manual
var idOverride = new IdentificationOverrides
var idOverride = new IdentificationOverrides
{
{
Author = group . First ( ) . Author ,
Author = group . First ( ) . Author ,
Album = group . First ( ) . Book ,
Book = group . First ( ) . Book ,
} ;
} ;
var config = new ImportDecisionMakerConfig
var config = new ImportDecisionMakerConfig
{
{