From 79907c881cc92ce9ee3973d5cf21749fe5fc58da Mon Sep 17 00:00:00 2001 From: Stevie Robinson Date: Sat, 13 Jan 2024 20:29:54 +0100 Subject: [PATCH] Add: New icon for deleted episodes with status missing from disk Signed-off-by: Stevie Robinson --- frontend/src/Activity/History/HistoryEventTypeCell.js | 8 ++++---- frontend/src/Helpers/Props/icons.js | 2 ++ src/NzbDrone.Core/Localization/Core/en.json | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/frontend/src/Activity/History/HistoryEventTypeCell.js b/frontend/src/Activity/History/HistoryEventTypeCell.js index cce30c6e5..2f5ef6ee1 100644 --- a/frontend/src/Activity/History/HistoryEventTypeCell.js +++ b/frontend/src/Activity/History/HistoryEventTypeCell.js @@ -6,7 +6,7 @@ import { icons, kinds } from 'Helpers/Props'; import translate from 'Utilities/String/translate'; import styles from './HistoryEventTypeCell.css'; -function getIconName(eventType) { +function getIconName(eventType, data) { switch (eventType) { case 'grabbed': return icons.DOWNLOADING; @@ -17,7 +17,7 @@ function getIconName(eventType) { case 'downloadFailed': return icons.DOWNLOADING; case 'episodeFileDeleted': - return icons.DELETE; + return data.reason === 'MissingFromDisk' ? icons.FILE_MISSING : icons.DELETE; case 'episodeFileRenamed': return icons.ORGANIZE; case 'downloadIgnored': @@ -47,7 +47,7 @@ function getTooltip(eventType, data) { case 'downloadFailed': return translate('DownloadFailedEpisodeTooltip'); case 'episodeFileDeleted': - return translate('EpisodeFileDeletedTooltip'); + return data.reason === 'MissingFromDisk' ? translate('EpisodeFileMissingTooltip') : translate('EpisodeFileDeletedTooltip'); case 'episodeFileRenamed': return translate('EpisodeFileRenamedTooltip'); case 'downloadIgnored': @@ -58,7 +58,7 @@ function getTooltip(eventType, data) { } function HistoryEventTypeCell({ eventType, data }) { - const iconName = getIconName(eventType); + const iconName = getIconName(eventType, data); const iconKind = getIconKind(eventType); const tooltip = getTooltip(eventType, data); diff --git a/frontend/src/Helpers/Props/icons.js b/frontend/src/Helpers/Props/icons.js index 37e670731..0d60c30e8 100644 --- a/frontend/src/Helpers/Props/icons.js +++ b/frontend/src/Helpers/Props/icons.js @@ -55,6 +55,7 @@ import { faEye as fasEye, faFastBackward as fasFastBackward, faFastForward as fasFastForward, + faFileCircleQuestion as fasFileCircleQuestion, faFileExport as fasFileExport, faFileInvoice as farFileInvoice, faFilter as fasFilter, @@ -146,6 +147,7 @@ export const EXPORT = fasFileExport; export const EXTERNAL_LINK = fasExternalLinkAlt; export const FATAL = fasTimesCircle; export const FILE = farFile; +export const FILE_MISSING = fasFileCircleQuestion; export const FILTER = fasFilter; export const FOOTNOTE = fasAsterisk; export const FOLDER = farFolder; diff --git a/src/NzbDrone.Core/Localization/Core/en.json b/src/NzbDrone.Core/Localization/Core/en.json index b4f04f39e..11033f983 100644 --- a/src/NzbDrone.Core/Localization/Core/en.json +++ b/src/NzbDrone.Core/Localization/Core/en.json @@ -418,10 +418,10 @@ "DownloadClientPneumaticSettingsNzbFolderHelpText": "This folder will need to be reachable from XBMC", "DownloadClientPneumaticSettingsStrmFolder": "Strm Folder", "DownloadClientPneumaticSettingsStrmFolderHelpText": ".strm files in this folder will be import by drone", - "DownloadClientQbittorrentSettingsFirstAndLastFirst": "First and Last First", - "DownloadClientQbittorrentSettingsFirstAndLastFirstHelpText": "Download first and last pieces first (qBittorrent 4.1.0+)", "DownloadClientQbittorrentSettingsContentLayout": "Content Layout", "DownloadClientQbittorrentSettingsContentLayoutHelpText": "Whether to use qBittorrent's configured content layout, the original layout from the torrent or always create a subfolder (qBittorrent 4.3.2+)", + "DownloadClientQbittorrentSettingsFirstAndLastFirst": "First and Last First", + "DownloadClientQbittorrentSettingsFirstAndLastFirstHelpText": "Download first and last pieces first (qBittorrent 4.1.0+)", "DownloadClientQbittorrentSettingsInitialStateHelpText": "Initial state for torrents added to qBittorrent. Note that Forced Torrents do not abide by seed restrictions", "DownloadClientQbittorrentSettingsSequentialOrder": "Sequential Order", "DownloadClientQbittorrentSettingsSequentialOrderHelpText": "Download in sequential order (qBittorrent 4.1.0+)", @@ -574,6 +574,7 @@ "EpisodeDownloaded": "Episode Downloaded", "EpisodeFileDeleted": "Episode File Deleted", "EpisodeFileDeletedTooltip": "Episode file deleted", + "EpisodeFileMissingTooltip": "Episode file missing", "EpisodeFileRenamed": "Episode File Renamed", "EpisodeFileRenamedTooltip": "Episode file renamed", "EpisodeFilesLoadError": "Unable to load episode files",