mirror of
https://github.com/Radarr/Radarr.git
synced 2025-04-24 06:27:08 -04:00
New: Show size in history details
(cherry picked from commit ce6536f8abab584c365dcccbc31a780b51f6b02d)
This commit is contained in:
parent
a3515db9f7
commit
f5c66c5093
3 changed files with 28 additions and 2 deletions
|
@ -18,6 +18,7 @@ import {
|
|||
} from 'typings/History';
|
||||
import formatDateTime from 'Utilities/Date/formatDateTime';
|
||||
import formatAge from 'Utilities/Number/formatAge';
|
||||
import formatBytes from 'Utilities/Number/formatBytes';
|
||||
import formatCustomFormatScore from 'Utilities/Number/formatCustomFormatScore';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import styles from './HistoryDetails.css';
|
||||
|
@ -50,6 +51,7 @@ function HistoryDetails(props: HistoryDetailsProps) {
|
|||
ageHours,
|
||||
ageMinutes,
|
||||
publishedDate,
|
||||
size,
|
||||
} = data as GrabbedHistoryData;
|
||||
|
||||
const downloadClientNameInfo = downloadClientName ?? downloadClient;
|
||||
|
@ -160,6 +162,13 @@ function HistoryDetails(props: HistoryDetailsProps) {
|
|||
})}
|
||||
/>
|
||||
) : null}
|
||||
|
||||
{size ? (
|
||||
<DescriptionListItem
|
||||
title={translate('Size')}
|
||||
data={formatBytes(size)}
|
||||
/>
|
||||
) : null}
|
||||
</DescriptionList>
|
||||
);
|
||||
}
|
||||
|
@ -191,7 +200,7 @@ function HistoryDetails(props: HistoryDetailsProps) {
|
|||
}
|
||||
|
||||
if (eventType === 'downloadFolderImported') {
|
||||
const { customFormatScore, droppedPath, importedPath } =
|
||||
const { customFormatScore, droppedPath, importedPath, size } =
|
||||
data as DownloadFolderImportedHistory;
|
||||
|
||||
return (
|
||||
|
@ -224,12 +233,19 @@ function HistoryDetails(props: HistoryDetailsProps) {
|
|||
data={formatCustomFormatScore(parseInt(customFormatScore))}
|
||||
/>
|
||||
) : null}
|
||||
|
||||
{size ? (
|
||||
<DescriptionListItem
|
||||
title={translate('FileSize')}
|
||||
data={formatBytes(size)}
|
||||
/>
|
||||
) : null}
|
||||
</DescriptionList>
|
||||
);
|
||||
}
|
||||
|
||||
if (eventType === 'movieFileDeleted') {
|
||||
const { reason, customFormatScore } = data as MovieFileDeletedHistory;
|
||||
const { reason, customFormatScore, size } = data as MovieFileDeletedHistory;
|
||||
|
||||
let reasonMessage = '';
|
||||
|
||||
|
@ -259,6 +275,13 @@ function HistoryDetails(props: HistoryDetailsProps) {
|
|||
data={formatCustomFormatScore(parseInt(customFormatScore))}
|
||||
/>
|
||||
) : null}
|
||||
|
||||
{size ? (
|
||||
<DescriptionListItem
|
||||
title={translate('FileSize')}
|
||||
data={formatBytes(size)}
|
||||
/>
|
||||
) : null}
|
||||
</DescriptionList>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -44,11 +44,13 @@ export interface DownloadFolderImportedHistory {
|
|||
downloadClientName: string;
|
||||
droppedPath: string;
|
||||
importedPath: string;
|
||||
size: string;
|
||||
}
|
||||
|
||||
export interface MovieFileDeletedHistory {
|
||||
customFormatScore?: string;
|
||||
reason: 'Manual' | 'MissingFromDisk' | 'Upgrade';
|
||||
size: string;
|
||||
}
|
||||
|
||||
export interface MovieFileRenamedHistory {
|
||||
|
|
|
@ -666,6 +666,7 @@
|
|||
"FileManagement": "File Management",
|
||||
"FileNameTokens": "File Name Tokens",
|
||||
"FileNames": "File Names",
|
||||
"FileSize": "File Size",
|
||||
"Filename": "Filename",
|
||||
"Files": "Files",
|
||||
"Filter": "Filter",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue