mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 21:13:28 -07:00
New: Improve messaging if release is in queue because all tracks in release were not imported
(cherry picked from commit 2728bf79ca41bc372de515cb09e1034a8c006c2b)
This commit is contained in:
parent
6292f223ac
commit
904fa629e1
1 changed files with 10 additions and 11 deletions
|
@ -149,14 +149,11 @@ namespace NzbDrone.Core.Download
|
|||
|
||||
var statusMessages = new List<TrackedDownloadStatusMessage>
|
||||
{
|
||||
new TrackedDownloadStatusMessage("One or more albums expected in this release were not imported or missing", new List<string>())
|
||||
new TrackedDownloadStatusMessage("One or more tracks expected in this release were not imported or missing from the release", new List<string>())
|
||||
};
|
||||
|
||||
if (importResults.Any(c => c.Result != ImportResultType.Imported))
|
||||
{
|
||||
// Mark as failed to prevent further attempts at processing
|
||||
trackedDownload.State = TrackedDownloadState.ImportFailed;
|
||||
|
||||
statusMessages.AddRange(
|
||||
importResults
|
||||
.Where(v => v.Result != ImportResultType.Imported && v.ImportDecision.Item != null)
|
||||
|
@ -165,14 +162,16 @@ namespace NzbDrone.Core.Download
|
|||
new TrackedDownloadStatusMessage(Path.GetFileName(v.ImportDecision.Item.Path),
|
||||
v.Errors)));
|
||||
|
||||
if (statusMessages.Any())
|
||||
{
|
||||
trackedDownload.Warn(statusMessages.ToArray());
|
||||
}
|
||||
|
||||
// Publish event to notify Album was imported incompelte
|
||||
// Publish event to notify album was imported incomplete
|
||||
_eventAggregator.PublishEvent(new AlbumImportIncompleteEvent(trackedDownload));
|
||||
return;
|
||||
}
|
||||
|
||||
if (statusMessages.Any())
|
||||
{
|
||||
trackedDownload.Warn(statusMessages.ToArray());
|
||||
|
||||
// Mark as failed to prevent further attempts at processing
|
||||
trackedDownload.State = TrackedDownloadState.ImportFailed;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue