New: Improve messaging if release is in queue because all episodes in release were not imported
This commit is contained in:
parent
cd28af98ee
commit
2728bf79ca
|
@ -3,3 +3,7 @@
|
|||
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
.noMessages {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,10 @@ function getDetailedPopoverBody(statusMessages) {
|
|||
{
|
||||
statusMessages.map(({ title, messages }) => {
|
||||
return (
|
||||
<div key={title}>
|
||||
<div
|
||||
key={title}
|
||||
className={messages.length ? undefined: styles.noMessages}
|
||||
>
|
||||
{title}
|
||||
<ul>
|
||||
{
|
||||
|
|
|
@ -63,6 +63,8 @@ export const defaultState = {
|
|||
};
|
||||
|
||||
export const persistState = [
|
||||
'interactiveImport.sortKey',
|
||||
'interactiveImport.sortDirection',
|
||||
'interactiveImport.recentFolders',
|
||||
'interactiveImport.importMode'
|
||||
];
|
||||
|
|
|
@ -126,16 +126,30 @@ namespace NzbDrone.Core.Download
|
|||
if (importResults.Empty())
|
||||
{
|
||||
trackedDownload.Warn("No files found are eligible for import in {0}", outputPath);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var statusMessages = new List<TrackedDownloadStatusMessage>
|
||||
{
|
||||
new TrackedDownloadStatusMessage("One or more episodes expected in this release were not imported or missing", new List<string>())
|
||||
};
|
||||
|
||||
if (importResults.Any(c => c.Result != ImportResultType.Imported))
|
||||
{
|
||||
var statusMessages = importResults
|
||||
.Where(v => v.Result != ImportResultType.Imported && v.ImportDecision.LocalEpisode != null)
|
||||
.Select(v => new TrackedDownloadStatusMessage(Path.GetFileName(v.ImportDecision.LocalEpisode.Path), v.Errors))
|
||||
.ToArray();
|
||||
statusMessages.AddRange(
|
||||
importResults
|
||||
.Where(v => v.Result != ImportResultType.Imported && v.ImportDecision.LocalEpisode != null)
|
||||
.OrderBy(v => v.ImportDecision.LocalEpisode.Path)
|
||||
.Select(v =>
|
||||
new TrackedDownloadStatusMessage(Path.GetFileName(v.ImportDecision.LocalEpisode.Path),
|
||||
v.Errors))
|
||||
);
|
||||
}
|
||||
|
||||
trackedDownload.Warn(statusMessages);
|
||||
if (statusMessages.Any())
|
||||
{
|
||||
trackedDownload.Warn(statusMessages.ToArray());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue