New: Runtime Column/Filter on Movie Index

Fixes #4131
pull/2/head
Qstick 5 years ago
parent 7584d95149
commit 3de65daf85

@ -32,6 +32,7 @@
.added, .added,
.inCinemas, .inCinemas,
.physicalRelease, .physicalRelease,
.runtime,
.genres { .genres {
composes: headerCell from '~Components/Table/VirtualTableHeaderCell.css'; composes: headerCell from '~Components/Table/VirtualTableHeaderCell.css';

@ -39,6 +39,7 @@
.added, .added,
.inCinemas, .inCinemas,
.physicalRelease, .physicalRelease,
.runtime,
.genres { .genres {
composes: cell; composes: cell;

@ -71,6 +71,7 @@ class MovieIndexRow extends Component {
added, added,
inCinemas, inCinemas,
physicalRelease, physicalRelease,
runtime,
minimumAvailability, minimumAvailability,
path, path,
sizeOnDisk, sizeOnDisk,
@ -212,6 +213,17 @@ class MovieIndexRow extends Component {
); );
} }
if (name === 'runtime') {
return (
<VirtualTableRowCell
key={name}
className={styles[name]}
>
{runtime} Minutes
</VirtualTableRowCell>
);
}
if (name === 'minimumAvailability') { if (name === 'minimumAvailability') {
return ( return (
<VirtualTableRowCell <VirtualTableRowCell
@ -376,6 +388,7 @@ MovieIndexRow.propTypes = {
added: PropTypes.string, added: PropTypes.string,
inCinemas: PropTypes.string, inCinemas: PropTypes.string,
physicalRelease: PropTypes.string, physicalRelease: PropTypes.string,
runtime: PropTypes.number,
minimumAvailability: PropTypes.string.isRequired, minimumAvailability: PropTypes.string.isRequired,
path: PropTypes.string.isRequired, path: PropTypes.string.isRequired,
sizeOnDisk: PropTypes.number.isRequired, sizeOnDisk: PropTypes.number.isRequired,

@ -114,6 +114,12 @@ export const defaultState = {
isSortable: true, isSortable: true,
isVisible: false isVisible: false
}, },
{
name: 'runtime',
label: 'Runtime',
isSortable: true,
isVisible: false
},
{ {
name: 'minimumAvailability', name: 'minimumAvailability',
label: 'Min Availability', label: 'Min Availability',
@ -272,6 +278,11 @@ export const defaultState = {
type: filterBuilderTypes.DATE, type: filterBuilderTypes.DATE,
valueType: filterBuilderValueTypes.DATE valueType: filterBuilderValueTypes.DATE
}, },
{
name: 'runtime',
label: 'Runtime',
type: filterBuilderTypes.NUMBER
},
{ {
name: 'path', name: 'path',
label: 'Path', label: 'Path',

Loading…
Cancel
Save