diff --git a/frontend/src/Activity/Queue/QueueStatus.js b/frontend/src/Activity/Queue/QueueStatus.js index c6e8cf5dd..f7cab31ca 100644 --- a/frontend/src/Activity/Queue/QueueStatus.js +++ b/frontend/src/Activity/Queue/QueueStatus.js @@ -70,6 +70,11 @@ function QueueStatus(props) { iconName = icons.DOWNLOADED; title = translate('Downloaded'); + if (trackedDownloadState === 'importBlocked') { + title += ` - ${translate('UnableToImportAutomatically')}`; + iconKind = kinds.WARNING; + } + if (trackedDownloadState === 'importPending') { title += ` - ${translate('WaitingToImport')}`; iconKind = kinds.PURPLE; diff --git a/src/NzbDrone.Core.Test/Download/CompletedDownloadServiceTests/ImportFixture.cs b/src/NzbDrone.Core.Test/Download/CompletedDownloadServiceTests/ImportFixture.cs index 3c6797324..ddb9fd8c6 100644 --- a/src/NzbDrone.Core.Test/Download/CompletedDownloadServiceTests/ImportFixture.cs +++ b/src/NzbDrone.Core.Test/Download/CompletedDownloadServiceTests/ImportFixture.cs @@ -366,7 +366,7 @@ private void AssertNotImported() Mocker.GetMock() .Verify(v => v.PublishEvent(It.IsAny()), Times.Never()); - _trackedDownload.State.Should().Be(TrackedDownloadState.ImportPending); + _trackedDownload.State.Should().Be(TrackedDownloadState.ImportBlocked); } private void AssertImported() diff --git a/src/NzbDrone.Core/Download/CompletedDownloadService.cs b/src/NzbDrone.Core/Download/CompletedDownloadService.cs index 5f4f94938..009cd7f65 100644 --- a/src/NzbDrone.Core/Download/CompletedDownloadService.cs +++ b/src/NzbDrone.Core/Download/CompletedDownloadService.cs @@ -64,8 +64,8 @@ public void Check(TrackedDownload trackedDownload) SetImportItem(trackedDownload); - // Only process tracked downloads that are still downloading - if (trackedDownload.State != TrackedDownloadState.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 && trackedDownload.State != TrackedDownloadState.ImportBlocked) { return; } @@ -96,7 +96,7 @@ public void Check(TrackedDownload trackedDownload) if (series == null) { 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; } @@ -108,7 +108,7 @@ public void Check(TrackedDownload trackedDownload) 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."); - SendManualInteractionRequiredNotification(trackedDownload); + SetStateToImportBlocked(trackedDownload); return; } @@ -129,7 +129,7 @@ public void Import(TrackedDownload trackedDownload) if (trackedDownload.RemoteEpisode == null) { trackedDownload.Warn("Unable to parse download, automatic import is not possible."); - SendManualInteractionRequiredNotification(trackedDownload); + SetStateToImportBlocked(trackedDownload); return; } @@ -187,7 +187,7 @@ public void Import(TrackedDownload trackedDownload) if (statusMessages.Any()) { trackedDownload.Warn(statusMessages.ToArray()); - SendManualInteractionRequiredNotification(trackedDownload); + SetStateToImportBlocked(trackedDownload); } } @@ -254,8 +254,10 @@ public bool VerifyImport(TrackedDownload trackedDownload, List imp return false; } - private void SendManualInteractionRequiredNotification(TrackedDownload trackedDownload) + private void SetStateToImportBlocked(TrackedDownload trackedDownload) { + trackedDownload.State = TrackedDownloadState.ImportBlocked; + if (!trackedDownload.HasNotifiedManualInteractionRequired) { var grabbedHistories = _historyService.FindByDownloadId(trackedDownload.DownloadItem.DownloadId).Where(h => h.EventType == EpisodeHistoryEventType.Grabbed).ToList(); diff --git a/src/NzbDrone.Core/Download/TrackedDownloads/TrackedDownload.cs b/src/NzbDrone.Core/Download/TrackedDownloads/TrackedDownload.cs index 05c25db81..0a982e7ff 100644 --- a/src/NzbDrone.Core/Download/TrackedDownloads/TrackedDownload.cs +++ b/src/NzbDrone.Core/Download/TrackedDownloads/TrackedDownload.cs @@ -40,6 +40,7 @@ public void Warn(params TrackedDownloadStatusMessage[] statusMessages) public enum TrackedDownloadState { Downloading, + ImportBlocked, ImportPending, Importing, Imported, diff --git a/src/NzbDrone.Core/Localization/Core/en.json b/src/NzbDrone.Core/Localization/Core/en.json index 73a556b40..6ddd95aee 100644 --- a/src/NzbDrone.Core/Localization/Core/en.json +++ b/src/NzbDrone.Core/Localization/Core/en.json @@ -1992,6 +1992,7 @@ "Umask770Description": "{octal} - Owner & Group write", "Umask775Description": "{octal} - Owner & Group write, Other read", "Umask777Description": "{octal} - Everyone write", + "UnableToImportAutomatically": "Unable to Import Automatically", "UnableToLoadAutoTagging": "Unable to load auto tagging", "UnableToLoadBackups": "Unable to load backups", "UnableToUpdateSonarrDirectly": "Unable to update {appName} directly,",