New: Improve UI status when downloads cannot be imported automatically
Closes #6873
This commit is contained in:
parent
63bed3e670
commit
6d5ff9c4d6
|
@ -70,6 +70,11 @@ function QueueStatus(props) {
|
||||||
iconName = icons.DOWNLOADED;
|
iconName = icons.DOWNLOADED;
|
||||||
title = translate('Downloaded');
|
title = translate('Downloaded');
|
||||||
|
|
||||||
|
if (trackedDownloadState === 'importBlocked') {
|
||||||
|
title += ` - ${translate('UnableToImportAutomatically')}`;
|
||||||
|
iconKind = kinds.WARNING;
|
||||||
|
}
|
||||||
|
|
||||||
if (trackedDownloadState === 'importPending') {
|
if (trackedDownloadState === 'importPending') {
|
||||||
title += ` - ${translate('WaitingToImport')}`;
|
title += ` - ${translate('WaitingToImport')}`;
|
||||||
iconKind = kinds.PURPLE;
|
iconKind = kinds.PURPLE;
|
||||||
|
|
|
@ -366,7 +366,7 @@ namespace NzbDrone.Core.Test.Download.CompletedDownloadServiceTests
|
||||||
Mocker.GetMock<IEventAggregator>()
|
Mocker.GetMock<IEventAggregator>()
|
||||||
.Verify(v => v.PublishEvent(It.IsAny<DownloadCompletedEvent>()), Times.Never());
|
.Verify(v => v.PublishEvent(It.IsAny<DownloadCompletedEvent>()), Times.Never());
|
||||||
|
|
||||||
_trackedDownload.State.Should().Be(TrackedDownloadState.ImportPending);
|
_trackedDownload.State.Should().Be(TrackedDownloadState.ImportBlocked);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AssertImported()
|
private void AssertImported()
|
||||||
|
|
|
@ -64,8 +64,8 @@ namespace NzbDrone.Core.Download
|
||||||
|
|
||||||
SetImportItem(trackedDownload);
|
SetImportItem(trackedDownload);
|
||||||
|
|
||||||
// Only process tracked downloads that are still downloading
|
// Only process tracked downloads that are still downloading or have been blocked for importing due to an issue with matching
|
||||||
if (trackedDownload.State != TrackedDownloadState.Downloading)
|
if (trackedDownload.State != TrackedDownloadState.Downloading && trackedDownload.State != TrackedDownloadState.ImportBlocked)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ namespace NzbDrone.Core.Download
|
||||||
if (series == null)
|
if (series == null)
|
||||||
{
|
{
|
||||||
trackedDownload.Warn("Series title mismatch; automatic import is not possible. Check the download troubleshooting entry on the wiki for common causes.");
|
trackedDownload.Warn("Series title mismatch; automatic import is not possible. Check the download troubleshooting entry on the wiki for common causes.");
|
||||||
SendManualInteractionRequiredNotification(trackedDownload);
|
SetStateToImportBlocked(trackedDownload);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,7 @@ namespace NzbDrone.Core.Download
|
||||||
if (seriesMatchType == SeriesMatchType.Id && releaseSource != ReleaseSourceType.InteractiveSearch)
|
if (seriesMatchType == SeriesMatchType.Id && releaseSource != ReleaseSourceType.InteractiveSearch)
|
||||||
{
|
{
|
||||||
trackedDownload.Warn("Found matching series via grab history, but release was matched to series by ID. Automatic import is not possible. See the FAQ for details.");
|
trackedDownload.Warn("Found matching series via grab history, but release was matched to series by ID. Automatic import is not possible. See the FAQ for details.");
|
||||||
SendManualInteractionRequiredNotification(trackedDownload);
|
SetStateToImportBlocked(trackedDownload);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -129,7 +129,7 @@ namespace NzbDrone.Core.Download
|
||||||
if (trackedDownload.RemoteEpisode == null)
|
if (trackedDownload.RemoteEpisode == null)
|
||||||
{
|
{
|
||||||
trackedDownload.Warn("Unable to parse download, automatic import is not possible.");
|
trackedDownload.Warn("Unable to parse download, automatic import is not possible.");
|
||||||
SendManualInteractionRequiredNotification(trackedDownload);
|
SetStateToImportBlocked(trackedDownload);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -187,7 +187,7 @@ namespace NzbDrone.Core.Download
|
||||||
if (statusMessages.Any())
|
if (statusMessages.Any())
|
||||||
{
|
{
|
||||||
trackedDownload.Warn(statusMessages.ToArray());
|
trackedDownload.Warn(statusMessages.ToArray());
|
||||||
SendManualInteractionRequiredNotification(trackedDownload);
|
SetStateToImportBlocked(trackedDownload);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -254,8 +254,10 @@ namespace NzbDrone.Core.Download
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SendManualInteractionRequiredNotification(TrackedDownload trackedDownload)
|
private void SetStateToImportBlocked(TrackedDownload trackedDownload)
|
||||||
{
|
{
|
||||||
|
trackedDownload.State = TrackedDownloadState.ImportBlocked;
|
||||||
|
|
||||||
if (!trackedDownload.HasNotifiedManualInteractionRequired)
|
if (!trackedDownload.HasNotifiedManualInteractionRequired)
|
||||||
{
|
{
|
||||||
var grabbedHistories = _historyService.FindByDownloadId(trackedDownload.DownloadItem.DownloadId).Where(h => h.EventType == EpisodeHistoryEventType.Grabbed).ToList();
|
var grabbedHistories = _historyService.FindByDownloadId(trackedDownload.DownloadItem.DownloadId).Where(h => h.EventType == EpisodeHistoryEventType.Grabbed).ToList();
|
||||||
|
|
|
@ -40,6 +40,7 @@ namespace NzbDrone.Core.Download.TrackedDownloads
|
||||||
public enum TrackedDownloadState
|
public enum TrackedDownloadState
|
||||||
{
|
{
|
||||||
Downloading,
|
Downloading,
|
||||||
|
ImportBlocked,
|
||||||
ImportPending,
|
ImportPending,
|
||||||
Importing,
|
Importing,
|
||||||
Imported,
|
Imported,
|
||||||
|
|
|
@ -1992,6 +1992,7 @@
|
||||||
"Umask770Description": "{octal} - Owner & Group write",
|
"Umask770Description": "{octal} - Owner & Group write",
|
||||||
"Umask775Description": "{octal} - Owner & Group write, Other read",
|
"Umask775Description": "{octal} - Owner & Group write, Other read",
|
||||||
"Umask777Description": "{octal} - Everyone write",
|
"Umask777Description": "{octal} - Everyone write",
|
||||||
|
"UnableToImportAutomatically": "Unable to Import Automatically",
|
||||||
"UnableToLoadAutoTagging": "Unable to load auto tagging",
|
"UnableToLoadAutoTagging": "Unable to load auto tagging",
|
||||||
"UnableToLoadBackups": "Unable to load backups",
|
"UnableToLoadBackups": "Unable to load backups",
|
||||||
"UnableToUpdateSonarrDirectly": "Unable to update {appName} directly,",
|
"UnableToUpdateSonarrDirectly": "Unable to update {appName} directly,",
|
||||||
|
|
Loading…
Reference in New Issue