mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-06 04:52:21 -07:00
New: Improve UI status when downloads cannot be imported automatically
(cherry picked from commit 6d5ff9c4d6993d16848980aea499a45b1b51d95c)
This commit is contained in:
parent
e8bb78e5bb
commit
a1a53dbb5e
15 changed files with 60 additions and 30 deletions
|
@ -57,30 +57,40 @@ function QueueStatusCell(props) {
|
|||
|
||||
if (status === 'paused') {
|
||||
iconName = icons.PAUSED;
|
||||
title = 'Paused';
|
||||
title = translate('Paused');
|
||||
}
|
||||
|
||||
if (status === 'queued') {
|
||||
iconName = icons.QUEUED;
|
||||
title = 'Queued';
|
||||
title = translate('Queued');
|
||||
}
|
||||
|
||||
if (status === 'completed') {
|
||||
iconName = icons.DOWNLOADED;
|
||||
title = 'Downloaded';
|
||||
title = translate('Downloaded');
|
||||
|
||||
if (trackedDownloadState === 'importBlocked') {
|
||||
title += ` - ${translate('UnableToImportAutomatically')}`;
|
||||
iconKind = kinds.WARNING;
|
||||
}
|
||||
|
||||
if (trackedDownloadState === 'importFailed') {
|
||||
title += ` - ${translate('ImportFailed', { sourceTitle })}`;
|
||||
iconKind = kinds.WARNING;
|
||||
}
|
||||
|
||||
if (trackedDownloadState === 'importPending') {
|
||||
title += ' - Waiting to Import';
|
||||
title += ` - ${translate('WaitingToImport')}`;
|
||||
iconKind = kinds.PURPLE;
|
||||
}
|
||||
|
||||
if (trackedDownloadState === 'importing') {
|
||||
title += ' - Importing';
|
||||
title += ` - ${translate('Importing')}`;
|
||||
iconKind = kinds.PURPLE;
|
||||
}
|
||||
|
||||
if (trackedDownloadState === 'failedPending') {
|
||||
title += ' - Waiting to Process';
|
||||
title += ` - ${translate('WaitingToProcess')}`;
|
||||
iconKind = kinds.DANGER;
|
||||
}
|
||||
}
|
||||
|
@ -91,36 +101,38 @@ function QueueStatusCell(props) {
|
|||
|
||||
if (status === 'delay') {
|
||||
iconName = icons.PENDING;
|
||||
title = 'Pending';
|
||||
title = translate('Pending');
|
||||
}
|
||||
|
||||
if (status === 'downloadClientUnavailable') {
|
||||
iconName = icons.PENDING;
|
||||
iconKind = kinds.WARNING;
|
||||
title = 'Pending - Download client is unavailable';
|
||||
title = translate('PendingDownloadClientUnavailable');
|
||||
}
|
||||
|
||||
if (status === 'failed') {
|
||||
iconName = icons.DOWNLOADING;
|
||||
iconKind = kinds.DANGER;
|
||||
title = 'Download failed';
|
||||
title = translate('DownloadFailed');
|
||||
}
|
||||
|
||||
if (status === 'warning') {
|
||||
iconName = icons.DOWNLOADING;
|
||||
iconKind = kinds.WARNING;
|
||||
title = `Download warning: ${errorMessage || 'check download client for more details'}`;
|
||||
const warningMessage =
|
||||
errorMessage || translate('CheckDownloadClientForDetails');
|
||||
title = translate('DownloadWarning', { warningMessage });
|
||||
}
|
||||
|
||||
if (hasError) {
|
||||
if (status === 'completed') {
|
||||
iconName = icons.DOWNLOAD;
|
||||
iconKind = kinds.DANGER;
|
||||
title = `Import failed: ${sourceTitle}`;
|
||||
title = translate('ImportFailed', { sourceTitle });
|
||||
} else {
|
||||
iconName = icons.DOWNLOADING;
|
||||
iconKind = kinds.DANGER;
|
||||
title = 'Download failed';
|
||||
title = translate('DownloadFailed');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ const EVENT_TYPE_OPTIONS = [
|
|||
{
|
||||
id: 7,
|
||||
get name() {
|
||||
return translate('ImportFailed');
|
||||
return translate('ImportCompleteFailed');
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
@ -150,7 +150,7 @@ export const defaultState = {
|
|||
},
|
||||
{
|
||||
key: 'importFailed',
|
||||
label: () => translate('ImportFailed'),
|
||||
label: () => translate('ImportCompleteFailed'),
|
||||
filters: [
|
||||
{
|
||||
key: 'eventType',
|
||||
|
|
|
@ -395,7 +395,7 @@ namespace NzbDrone.Core.Test.Download.CompletedDownloadServiceTests
|
|||
Mocker.GetMock<IEventAggregator>()
|
||||
.Verify(v => v.PublishEvent(It.IsAny<DownloadCompletedEvent>()), Times.Never());
|
||||
|
||||
_trackedDownload.State.Should().Be(TrackedDownloadState.ImportFailed);
|
||||
_trackedDownload.State.Should().Be(TrackedDownloadState.ImportBlocked);
|
||||
}
|
||||
|
||||
private void AssertImported()
|
||||
|
|
|
@ -63,8 +63,8 @@ namespace NzbDrone.Core.Download
|
|||
|
||||
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;
|
||||
}
|
||||
|
@ -93,7 +93,9 @@ namespace NzbDrone.Core.Download
|
|||
|
||||
if (artist == null)
|
||||
{
|
||||
trackedDownload.Warn("Artist name mismatch, automatic import is not possible.");
|
||||
trackedDownload.Warn("Artist name mismatch, automatic import is not possible. Check the download troubleshooting entry on the wiki for common causes.");
|
||||
SetStateToImportBlocked(trackedDownload);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -113,6 +115,8 @@ namespace NzbDrone.Core.Download
|
|||
if (trackedDownload.RemoteAlbum == null)
|
||||
{
|
||||
trackedDownload.Warn("Unable to parse download, automatic import is not possible.");
|
||||
SetStateToImportBlocked(trackedDownload);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -169,9 +173,7 @@ namespace NzbDrone.Core.Download
|
|||
if (statusMessages.Any())
|
||||
{
|
||||
trackedDownload.Warn(statusMessages.ToArray());
|
||||
|
||||
// Mark as failed to prevent further attempts at processing
|
||||
trackedDownload.State = TrackedDownloadState.ImportFailed;
|
||||
SetStateToImportBlocked(trackedDownload);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -237,6 +239,11 @@ namespace NzbDrone.Core.Download
|
|||
return false;
|
||||
}
|
||||
|
||||
private void SetStateToImportBlocked(TrackedDownload trackedDownload)
|
||||
{
|
||||
trackedDownload.State = TrackedDownloadState.ImportBlocked;
|
||||
}
|
||||
|
||||
private void SetImportItem(TrackedDownload trackedDownload)
|
||||
{
|
||||
trackedDownload.ImportItem = _provideImportItemService.ProvideImportItem(trackedDownload.DownloadItem, trackedDownload.ImportItem);
|
||||
|
|
|
@ -41,6 +41,7 @@ namespace NzbDrone.Core.Download.TrackedDownloads
|
|||
Downloading,
|
||||
DownloadFailed,
|
||||
DownloadFailedPending,
|
||||
ImportBlocked,
|
||||
ImportPending,
|
||||
Importing,
|
||||
ImportFailed,
|
||||
|
|
|
@ -782,7 +782,7 @@
|
|||
"DownloadImported": "Importiere herunterladen",
|
||||
"EditMetadata": "Metadaten bearbeiten",
|
||||
"ForNewImportsOnly": "Nur für neue Imports",
|
||||
"ImportFailed": "Import fehlgeschlagen",
|
||||
"ImportCompleteFailed": "Import fehlgeschlagen",
|
||||
"EndedOnly": "Nur beendete",
|
||||
"MassAlbumsCutoffUnmetWarning": "Bist du dir sicher, dass du nach allen '{0}' Alben suchen willst deren Schwelle nicht erreicht worden ist?",
|
||||
"SearchForAllMissingAlbumsConfirmationCount": "Bist du sicher, dass du nach allen {totalRecords} fehlenden Alben suchen möchtest?",
|
||||
|
|
|
@ -751,7 +751,7 @@
|
|||
"GoToArtistListing": "Μεταβείτε στη λίστα καλλιτεχνών",
|
||||
"HideAlbums": "Απόκρυψη άλμπουμ",
|
||||
"HideTracks": "Απόκρυψη κομματιών",
|
||||
"ImportFailed": "Η εισαγωγή απέτυχε",
|
||||
"ImportCompleteFailed": "Η εισαγωγή απέτυχε",
|
||||
"ImportFailures": "Αστοχίες εισαγωγής",
|
||||
"ImportLists": "Λίστες εισαγωγής",
|
||||
"ImportListSpecificSettings": "Εισαγωγή ειδικών ρυθμίσεων λίστας",
|
||||
|
|
|
@ -197,6 +197,7 @@
|
|||
"ChangeCategoryMultipleHint": "Changes downloads to the 'Post-Import Category' from Download Client",
|
||||
"ChangeFileDate": "Change File Date",
|
||||
"ChangeHasNotBeenSavedYet": "Change has not been saved yet",
|
||||
"CheckDownloadClientForDetails": "check download client for more details",
|
||||
"ChmodFolder": "chmod Folder",
|
||||
"ChmodFolderHelpText": "Octal, applied during import/rename to media folders and files (without execute bits)",
|
||||
"ChmodFolderHelpTextWarning": "This only works if the user running {appName} is the owner of the file. It's better to ensure the download client sets the permissions properly.",
|
||||
|
@ -406,7 +407,9 @@
|
|||
"DownloadPropersAndRepacksHelpTextWarning": "Use custom formats for automatic upgrades to Propers/Repacks",
|
||||
"DownloadPropersAndRepacksHelpTexts1": "Whether or not to automatically upgrade to Propers/Repacks",
|
||||
"DownloadPropersAndRepacksHelpTexts2": "Use 'Do not Prefer' to sort by preferred word score over propers/repacks",
|
||||
"DownloadWarning": "Download warning: {warningMessage}",
|
||||
"DownloadWarningCheckDownloadClientForMoreDetails": "Download warning: check download client for more details",
|
||||
"Downloaded": "Downloaded",
|
||||
"DownloadedImporting": "'Downloaded - Importing'",
|
||||
"DownloadedUnableToImportCheckLogsForDetails": "'Downloaded - Unable to Import: check logs for details'",
|
||||
"DownloadedWaitingToImport": "'Downloaded - Waiting to Import'",
|
||||
|
@ -571,9 +574,10 @@
|
|||
"IllRestartLater": "I'll restart later",
|
||||
"Implementation": "Implementation",
|
||||
"Import": "Import",
|
||||
"ImportCompleteFailed": "Import Failed",
|
||||
"ImportExtraFiles": "Import Extra Files",
|
||||
"ImportExtraFilesHelpText": "Import matching extra files (subtitles, nfo, etc) after importing an track file",
|
||||
"ImportFailed": "Import Failed",
|
||||
"ImportFailed": "Import Failed: {sourceTitle}",
|
||||
"ImportFailedInterp": "Import failed: {0}",
|
||||
"ImportFailures": "Import failures",
|
||||
"ImportList": "Import List",
|
||||
|
@ -891,7 +895,10 @@
|
|||
"Path": "Path",
|
||||
"PathHelpText": "Root Folder containing your music library",
|
||||
"PathHelpTextWarning": "This must be different to the directory where your download client puts files",
|
||||
"Paused": "Paused",
|
||||
"Peers": "Peers",
|
||||
"Pending": "Pending",
|
||||
"PendingDownloadClientUnavailable": "Pending - Download client is unavailable",
|
||||
"Period": "Period",
|
||||
"Permissions": "Permissions",
|
||||
"Playlist": "Playlist",
|
||||
|
@ -1268,6 +1275,7 @@
|
|||
"UnableToAddANewQualityProfilePleaseTryAgain": "Unable to add a new quality profile, please try again.",
|
||||
"UnableToAddANewRemotePathMappingPleaseTryAgain": "Unable to add a new remote path mapping, please try again.",
|
||||
"UnableToAddANewRootFolderPleaseTryAgain": "Unable to add a new root folder, please try again.",
|
||||
"UnableToImportAutomatically": "Unable to Import Automatically",
|
||||
"UnableToLoadBackups": "Unable to load backups",
|
||||
"UnableToLoadBlocklist": "Unable to load blocklist",
|
||||
"UnableToLoadCustomFormats": "Unable to load custom formats",
|
||||
|
@ -1335,6 +1343,8 @@
|
|||
"UsingExternalUpdateMechanismBranchToUseToUpdateLidarr": "Branch to use to update {appName}",
|
||||
"UsingExternalUpdateMechanismBranchUsedByExternalUpdateMechanism": "Branch used by external update mechanism",
|
||||
"Version": "Version",
|
||||
"WaitingToImport": "Waiting to Import",
|
||||
"WaitingToProcess": "Waiting to Process",
|
||||
"Wanted": "Wanted",
|
||||
"Warn": "Warn",
|
||||
"WatchLibraryForChangesHelpText": "Rescan automatically when files change in a root folder",
|
||||
|
|
|
@ -1126,7 +1126,7 @@
|
|||
"DefaultLidarrTags": "Etiquetas predeterminadas de {appName}",
|
||||
"ExpandItemsByDefault": "Expandir elementos predeterminados",
|
||||
"DownloadedWaitingToImport": "'Descargados - Esperando para importar'",
|
||||
"ImportFailed": "La importación falló",
|
||||
"ImportCompleteFailed": "La importación falló",
|
||||
"IsInUseCantDeleteAMetadataProfileThatIsAttachedToAnArtistOrImportList": "No se puede eliminar un perfil de metadatos que está enlazado a un artista o a una lista de importación",
|
||||
"IsExpandedShowTracks": "Mostrar pistas",
|
||||
"IsInUseCantDeleteAQualityProfileThatIsAttachedToAnArtistOrImportList": "No se puede eliminar un perfil de calidad que está enlazado a un artista o a una lista de importación",
|
||||
|
|
|
@ -773,7 +773,7 @@
|
|||
"ExistingAlbumsData": "Valvo albumeita, joille on tiedostoja tai joita ei ole vielä julkaistu.",
|
||||
"ForNewImportsOnly": "Vain uusille tuonneille",
|
||||
"HasMonitoredAlbumsNoMonitoredAlbumsForThisArtist": "Esittäjältä ei valvota albumeita",
|
||||
"ImportFailed": "Tuonti epäonnistui",
|
||||
"ImportCompleteFailed": "Tuonti epäonnistui",
|
||||
"ImportFailures": "Tuontivirheet",
|
||||
"ImportLists": "Tuontilistat",
|
||||
"ImportListSettings": "Tuontilistojen yleisasetukset",
|
||||
|
|
|
@ -897,7 +897,7 @@
|
|||
"DeleteMetadataProfile": "Supprimer le profil de métadonnées",
|
||||
"HasMonitoredAlbumsNoMonitoredAlbumsForThisArtist": "Aucun album surveillé pour cet artiste",
|
||||
"ImportFailures": "Échecs d’importation",
|
||||
"ImportFailed": "Échec de l'importation",
|
||||
"ImportCompleteFailed": "Échec de l'importation",
|
||||
"IndexerIdHelpTextWarning": "L'utilisation d'un indexeur spécifique avec les mots préférés peut conduire à la saisie de versions en double",
|
||||
"LastAlbum": "Dernier album",
|
||||
"ListRefreshInterval": "Intervalle d'actualisation de la liste",
|
||||
|
|
|
@ -790,7 +790,7 @@
|
|||
"ForNewImportsOnly": "Csak új importokra",
|
||||
"EndedOnly": "Csak a véget értek",
|
||||
"ContinuingOnly": "Csak folytatás",
|
||||
"ImportFailed": "Az importálás sikertelen",
|
||||
"ImportCompleteFailed": "Az importálás sikertelen",
|
||||
"MediaCount": "Médiaszám",
|
||||
"MissingTracks": "Hiányzó számok",
|
||||
"MonitorNewItems": "Új albumok monitorozása",
|
||||
|
|
|
@ -789,7 +789,7 @@
|
|||
"EditMetadata": "Editar metadados",
|
||||
"EditReleaseProfile": "Editar perfil de lançamento",
|
||||
"ForNewImportsOnly": "Para novas importações somente",
|
||||
"ImportFailed": "Falha na importação",
|
||||
"ImportCompleteFailed": "Falha na importação",
|
||||
"MissingTracks": "Faixas Ausentes",
|
||||
"NewAlbums": "Novos Álbuns",
|
||||
"NextAlbum": "Próximo Álbum",
|
||||
|
|
|
@ -708,7 +708,7 @@
|
|||
"Other": "其他",
|
||||
"OutputPath": "输出路径",
|
||||
"QualitiesHelpText": "即使未勾选,列表中靠前的质量优先级更高。同组内的质量优先级相同。仅需勾选需要的质量",
|
||||
"ImportFailed": "导入失败",
|
||||
"ImportCompleteFailed": "导入失败",
|
||||
"TrackArtist": "歌曲歌手",
|
||||
"OnAlbumDelete": "当专辑删除时",
|
||||
"OnArtistDelete": "当歌手删除时",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue