1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-08-18 08:19:38 +02:00

New: Runtime Column/Filter on Movie Index

Fixes #4131
This commit is contained in:
Qstick 2020-02-25 20:30:42 -05:00
parent 7584d95149
commit 3de65daf85
4 changed files with 26 additions and 0 deletions

View File

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

View File

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

View File

@ -71,6 +71,7 @@ class MovieIndexRow extends Component {
added,
inCinemas,
physicalRelease,
runtime,
minimumAvailability,
path,
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') {
return (
<VirtualTableRowCell
@ -376,6 +388,7 @@ MovieIndexRow.propTypes = {
added: PropTypes.string,
inCinemas: PropTypes.string,
physicalRelease: PropTypes.string,
runtime: PropTypes.number,
minimumAvailability: PropTypes.string.isRequired,
path: PropTypes.string.isRequired,
sizeOnDisk: PropTypes.number.isRequired,

View File

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