mirror of
https://github.com/Lidarr/Lidarr
synced 2026-05-07 12:02:14 +02:00
Fixed: Manual Import failing to show files when processing fails
This commit is contained in:
parent
f5ed5d7adc
commit
9b79c86f81
2 changed files with 21 additions and 3 deletions
|
|
@ -123,10 +123,27 @@ public List<ManualImportItem> GetMediaFiles(string path, string downloadId, Arti
|
|||
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 @@ public List<Artist> AddArtists(List<Artist> newArtists, bool doRefresh = true, b
|
|||
_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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue