mirror of https://github.com/Radarr/Radarr
parent
d5e6cc542f
commit
c8095faa1f
|
@ -1,6 +1,7 @@
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import titleCase from 'Utilities/String/titleCase';
|
import titleCase from 'Utilities/String/titleCase';
|
||||||
|
import formatBytes from 'Utilities/Number/formatBytes';
|
||||||
import { icons } from 'Helpers/Props';
|
import { icons } from 'Helpers/Props';
|
||||||
import HeartRating from 'Components/HeartRating';
|
import HeartRating from 'Components/HeartRating';
|
||||||
import IconButton from 'Components/Link/IconButton';
|
import IconButton from 'Components/Link/IconButton';
|
||||||
|
@ -71,6 +72,7 @@ class MovieIndexRow extends Component {
|
||||||
physicalRelease,
|
physicalRelease,
|
||||||
minimumAvailability,
|
minimumAvailability,
|
||||||
path,
|
path,
|
||||||
|
sizeOnDisk,
|
||||||
genres,
|
genres,
|
||||||
ratings,
|
ratings,
|
||||||
certification,
|
certification,
|
||||||
|
@ -220,6 +222,17 @@ class MovieIndexRow extends Component {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (name === 'sizeOnDisk') {
|
||||||
|
return (
|
||||||
|
<VirtualTableRowCell
|
||||||
|
key={name}
|
||||||
|
className={styles[name]}
|
||||||
|
>
|
||||||
|
{formatBytes(sizeOnDisk)}
|
||||||
|
</VirtualTableRowCell>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (name === 'genres') {
|
if (name === 'genres') {
|
||||||
const joinedGenres = genres.join(', ');
|
const joinedGenres = genres.join(', ');
|
||||||
|
|
||||||
|
@ -352,6 +365,7 @@ MovieIndexRow.propTypes = {
|
||||||
physicalRelease: PropTypes.string,
|
physicalRelease: PropTypes.string,
|
||||||
minimumAvailability: PropTypes.string.isRequired,
|
minimumAvailability: PropTypes.string.isRequired,
|
||||||
path: PropTypes.string.isRequired,
|
path: PropTypes.string.isRequired,
|
||||||
|
sizeOnDisk: PropTypes.number.isRequired,
|
||||||
genres: PropTypes.arrayOf(PropTypes.string).isRequired,
|
genres: PropTypes.arrayOf(PropTypes.string).isRequired,
|
||||||
ratings: PropTypes.object.isRequired,
|
ratings: PropTypes.object.isRequired,
|
||||||
certification: PropTypes.string,
|
certification: PropTypes.string,
|
||||||
|
|
|
@ -120,6 +120,12 @@ export const defaultState = {
|
||||||
isSortable: true,
|
isSortable: true,
|
||||||
isVisible: false
|
isVisible: false
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'sizeOnDisk',
|
||||||
|
label: 'Size on Disk',
|
||||||
|
isSortable: true,
|
||||||
|
isVisible: false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'genres',
|
name: 'genres',
|
||||||
label: 'Genres',
|
label: 'Genres',
|
||||||
|
@ -167,12 +173,6 @@ export const defaultState = {
|
||||||
return studio ? studio.toLowerCase() : '';
|
return studio ? studio.toLowerCase() : '';
|
||||||
},
|
},
|
||||||
|
|
||||||
sizeOnDisk: function(item) {
|
|
||||||
const { statistics = {} } = item;
|
|
||||||
|
|
||||||
return statistics.sizeOnDisk;
|
|
||||||
},
|
|
||||||
|
|
||||||
ratings: function(item) {
|
ratings: function(item) {
|
||||||
const { ratings = {} } = item;
|
const { ratings = {} } = item;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue