mirror of
https://github.com/Radarr/Radarr
synced 2025-12-06 16:32:36 +01: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';
|
} from 'typings/History';
|
||||||
import formatDateTime from 'Utilities/Date/formatDateTime';
|
import formatDateTime from 'Utilities/Date/formatDateTime';
|
||||||
import formatAge from 'Utilities/Number/formatAge';
|
import formatAge from 'Utilities/Number/formatAge';
|
||||||
|
import formatBytes from 'Utilities/Number/formatBytes';
|
||||||
import formatCustomFormatScore from 'Utilities/Number/formatCustomFormatScore';
|
import formatCustomFormatScore from 'Utilities/Number/formatCustomFormatScore';
|
||||||
import translate from 'Utilities/String/translate';
|
import translate from 'Utilities/String/translate';
|
||||||
import styles from './HistoryDetails.css';
|
import styles from './HistoryDetails.css';
|
||||||
|
|
@ -50,6 +51,7 @@ function HistoryDetails(props: HistoryDetailsProps) {
|
||||||
ageHours,
|
ageHours,
|
||||||
ageMinutes,
|
ageMinutes,
|
||||||
publishedDate,
|
publishedDate,
|
||||||
|
size,
|
||||||
} = data as GrabbedHistoryData;
|
} = data as GrabbedHistoryData;
|
||||||
|
|
||||||
const downloadClientNameInfo = downloadClientName ?? downloadClient;
|
const downloadClientNameInfo = downloadClientName ?? downloadClient;
|
||||||
|
|
@ -160,6 +162,13 @@ function HistoryDetails(props: HistoryDetailsProps) {
|
||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
|
{size ? (
|
||||||
|
<DescriptionListItem
|
||||||
|
title={translate('Size')}
|
||||||
|
data={formatBytes(size)}
|
||||||
|
/>
|
||||||
|
) : null}
|
||||||
</DescriptionList>
|
</DescriptionList>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -191,7 +200,7 @@ function HistoryDetails(props: HistoryDetailsProps) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eventType === 'downloadFolderImported') {
|
if (eventType === 'downloadFolderImported') {
|
||||||
const { customFormatScore, droppedPath, importedPath } =
|
const { customFormatScore, droppedPath, importedPath, size } =
|
||||||
data as DownloadFolderImportedHistory;
|
data as DownloadFolderImportedHistory;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -224,12 +233,19 @@ function HistoryDetails(props: HistoryDetailsProps) {
|
||||||
data={formatCustomFormatScore(parseInt(customFormatScore))}
|
data={formatCustomFormatScore(parseInt(customFormatScore))}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
|
{size ? (
|
||||||
|
<DescriptionListItem
|
||||||
|
title={translate('FileSize')}
|
||||||
|
data={formatBytes(size)}
|
||||||
|
/>
|
||||||
|
) : null}
|
||||||
</DescriptionList>
|
</DescriptionList>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eventType === 'movieFileDeleted') {
|
if (eventType === 'movieFileDeleted') {
|
||||||
const { reason, customFormatScore } = data as MovieFileDeletedHistory;
|
const { reason, customFormatScore, size } = data as MovieFileDeletedHistory;
|
||||||
|
|
||||||
let reasonMessage = '';
|
let reasonMessage = '';
|
||||||
|
|
||||||
|
|
@ -259,6 +275,13 @@ function HistoryDetails(props: HistoryDetailsProps) {
|
||||||
data={formatCustomFormatScore(parseInt(customFormatScore))}
|
data={formatCustomFormatScore(parseInt(customFormatScore))}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
|
{size ? (
|
||||||
|
<DescriptionListItem
|
||||||
|
title={translate('FileSize')}
|
||||||
|
data={formatBytes(size)}
|
||||||
|
/>
|
||||||
|
) : null}
|
||||||
</DescriptionList>
|
</DescriptionList>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,11 +44,13 @@ export interface DownloadFolderImportedHistory {
|
||||||
downloadClientName: string;
|
downloadClientName: string;
|
||||||
droppedPath: string;
|
droppedPath: string;
|
||||||
importedPath: string;
|
importedPath: string;
|
||||||
|
size: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MovieFileDeletedHistory {
|
export interface MovieFileDeletedHistory {
|
||||||
customFormatScore?: string;
|
customFormatScore?: string;
|
||||||
reason: 'Manual' | 'MissingFromDisk' | 'Upgrade';
|
reason: 'Manual' | 'MissingFromDisk' | 'Upgrade';
|
||||||
|
size: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MovieFileRenamedHistory {
|
export interface MovieFileRenamedHistory {
|
||||||
|
|
|
||||||
|
|
@ -666,6 +666,7 @@
|
||||||
"FileManagement": "File Management",
|
"FileManagement": "File Management",
|
||||||
"FileNameTokens": "File Name Tokens",
|
"FileNameTokens": "File Name Tokens",
|
||||||
"FileNames": "File Names",
|
"FileNames": "File Names",
|
||||||
|
"FileSize": "File Size",
|
||||||
"Filename": "Filename",
|
"Filename": "Filename",
|
||||||
"Files": "Files",
|
"Files": "Files",
|
||||||
"Filter": "Filter",
|
"Filter": "Filter",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue