Fixed: Manual Import failing to show files when processing fails
This commit is contained in:
committed by
bakerboy448
parent
7cfa16a10b
commit
1eb6b8061b
@@ -123,10 +123,27 @@ namespace NzbDrone.Core.MediaFiles.TrackImport.Manual
|
||||
AddNewArtists = false
|
||||
};
|
||||
|
||||
var decision = _importDecisionMaker.GetImportDecisions(files, null, null, config);
|
||||
var result = MapItem(decision.First(), downloadId, replaceExistingFiles, false);
|
||||
var decisions = _importDecisionMaker.GetImportDecisions(files, null, null, config);
|
||||
|
||||
return new List<ManualImportItem> { result };
|
||||
if (decisions.Any())
|
||||
{
|
||||
var result = MapItem(decisions.First(), downloadId, replaceExistingFiles, false);
|
||||
return new List<ManualImportItem> { result };
|
||||
}
|
||||
|
||||
return new List<ManualImportItem>
|
||||
{
|
||||
new ManualImportItem()
|
||||
{
|
||||
Id = HashConverter.GetHashInt31(path),
|
||||
DownloadId = downloadId,
|
||||
Path = path,
|
||||
Name = Path.GetFileNameWithoutExtension(path),
|
||||
Size = _diskProvider.GetFileSize(path),
|
||||
Rejections = new List<Rejection> { new Rejection("Unable to process file") },
|
||||
ReplaceExistingFiles = replaceExistingFiles
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
return ProcessFolder(path, downloadId, artist, filter, replaceExistingFiles);
|
||||
|
||||
@@ -90,6 +90,7 @@ namespace NzbDrone.Core.Music
|
||||
_logger.Debug("Musicbrainz ID {0} was not added due to validation failure: Artist already exists in database", s.ForeignArtistId);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (artistsToAdd.Any(f => f.ForeignArtistId == artist.ForeignArtistId))
|
||||
{
|
||||
_logger.Debug("Musicbrainz ID {0} was not added due to validation failure: Artist already exists on list", s.ForeignArtistId);
|
||||
|
||||
Reference in New Issue
Block a user