New: Add icon for deleted episodes with status missing from disk

Signed-off-by: Stevie Robinson <stevie.robinson@gmail.com>
(cherry picked from commit 79907c881cc92ce9ee3973d5cf21749fe5fc58da)

Closes #4451
pull/4470/head
Stevie Robinson 4 months ago committed by Bogdan
parent 9aae065c5d
commit 1dcc8b5850

@ -3,9 +3,10 @@ import React from 'react';
import Icon from 'Components/Icon';
import TableRowCell from 'Components/Table/Cells/TableRowCell';
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;
@ -16,7 +17,7 @@ function getIconName(eventType) {
case 'downloadFailed':
return icons.DOWNLOADING;
case 'trackFileDeleted':
return icons.DELETE;
return data.reason === 'MissingFromDisk' ? icons.FILE_MISSING : icons.DELETE;
case 'trackFileRenamed':
return icons.ORGANIZE;
case 'trackFileRetagged':
@ -54,11 +55,11 @@ function getTooltip(eventType, data) {
case 'downloadFailed':
return 'Album download failed';
case 'trackFileDeleted':
return 'Track file deleted';
return data.reason === 'MissingFromDisk' ? translate('TrackFileMissingTooltip') : translate('TrackFileDeletedTooltip');
case 'trackFileRenamed':
return 'Track file renamed';
return translate('TrackFileRenamedTooltip');
case 'trackFileRetagged':
return 'Track file tags updated';
return translate('TrackFileTagsUpdatedTooltip');
case 'albumImportIncomplete':
return 'Files downloaded but not all could be imported';
case 'downloadImported':
@ -71,7 +72,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);

@ -55,6 +55,7 @@ import {
faEye as fasEye,
faFastBackward as fasFastBackward,
faFastForward as fasFastForward,
faFileCircleQuestion as fasFileCircleQuestion,
faFileExport as fasFileExport,
faFileImport as fasFileImport,
faFileInvoice as farFileInvoice,
@ -154,7 +155,8 @@ export const EXPORT = fasFileExport;
export const EXTERNAL_LINK = fasExternalLinkAlt;
export const FATAL = fasTimesCircle;
export const FILE = farFile;
export const FILEIMPORT = fasFileImport;
export const FILE_IMPORT = fasFileImport;
export const FILE_MISSING = fasFileCircleQuestion;
export const FILTER = fasFilter;
export const FOLDER = farFolder;
export const FOLDER_OPEN = fasFolderOpen;

@ -51,11 +51,11 @@ class SelectTrackRow extends Component {
iconKind = kinds.DEFAULT;
iconTip = 'Track missing from library and no import selected.';
} else if (importSelected && hasFile) {
iconName = icons.FILEIMPORT;
iconName = icons.FILE_IMPORT;
iconKind = kinds.WARNING;
iconTip = 'Warning: Existing track will be replaced by download.';
} else if (importSelected && !hasFile) {
iconName = icons.FILEIMPORT;
iconName = icons.FILE_IMPORT;
iconKind = kinds.DEFAULT;
iconTip = 'Track missing from library and selected for import.';
}

@ -1069,6 +1069,10 @@
"TrackCount": "Track Count",
"TrackDownloaded": "Track Downloaded",
"TrackFileCounttotalTrackCountTracksDownloadedInterp": "{0}/{1} tracks downloaded",
"TrackFileDeletedTooltip": "Track file deleted",
"TrackFileMissingTooltip": "Track file missing",
"TrackFileRenamedTooltip": "Track file renamed",
"TrackFileTagsUpdatedTooltip": "Track file tags updated",
"TrackFiles": "Track Files",
"TrackFilesCountMessage": "No track files",
"TrackFilesLoadError": "Unable to load track files",

Loading…
Cancel
Save