1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-11-26 04:33:01 +01:00

Fixed: Size on disk sorting and display

Closes #4014
This commit is contained in:
Mark McDowall 2020-10-12 16:27:21 -07:00
parent dab6242ff2
commit 4ad137f1eb
3 changed files with 8 additions and 4 deletions

View File

@ -426,7 +426,7 @@ class SeriesDetails extends Component {
<span className={styles.sizeOnDisk}>
{
formatBytes(sizeOnDisk)
formatBytes(sizeOnDisk || 0)
}
</span>
</Label>

View File

@ -97,7 +97,8 @@ class SeriesIndexPoster extends Component {
seasonCount,
episodeCount,
episodeFileCount,
totalEpisodeCount
totalEpisodeCount,
sizeOnDisk
} = statistics;
const {
@ -226,6 +227,7 @@ class SeriesIndexPoster extends Component {
<SeriesIndexPosterInfo
seasonCount={seasonCount}
sizeOnDisk={sizeOnDisk}
qualityProfile={qualityProfile}
showQualityProfile={showQualityProfile}
showRelativeDates={showRelativeDates}

View File

@ -121,7 +121,9 @@ export const filterPredicates = {
sizeOnDisk: function(item, filterValue, type) {
const predicate = filterTypePredicates[type];
const sizeOnDisk = item.statistics ? item.statistics.sizeOnDisk : 0;
const sizeOnDisk = item.statistics && item.statistics.sizeOnDisk ?
item.statistics.sizeOnDisk :
0;
return predicate(sizeOnDisk, filterValue);
}
@ -145,7 +147,7 @@ export const sortPredicates = {
sizeOnDisk: function(item) {
const { statistics = {} } = item;
return statistics.sizeOnDisk;
return statistics.sizeOnDisk || 0;
}
};