Fix: use isAvailable to determine if a movie is available.

pull/3883/head
geogolem 5 years ago committed by Devin Buhl
parent c5d7cf4eeb
commit a06b044342

@ -1,6 +1,5 @@
import PropTypes from 'prop-types';
import React from 'react';
import isBefore from 'Utilities/Date/isBefore';
import { icons, kinds, sizes } from 'Helpers/Props';
import Icon from 'Components/Icon';
import ProgressBar from 'Components/ProgressBar';
@ -30,6 +29,7 @@ function getTooltip(title, quality, size) {
function MovieStatus(props) {
const {
inCinemas,
isAvailable,
monitored,
grabbed,
queueItem,
@ -38,7 +38,7 @@ function MovieStatus(props) {
const hasMovieFile = !!movieFile;
const isQueued = !!queueItem;
const hasReleased = isBefore(inCinemas);
const hasReleased = isAvailable;
if (isQueued) {
const {
@ -144,6 +144,7 @@ function MovieStatus(props) {
MovieStatus.propTypes = {
inCinemas: PropTypes.string,
isAvailable: PropTypes.bool,
monitored: PropTypes.bool.isRequired,
grabbed: PropTypes.bool,
queueItem: PropTypes.object,

@ -14,6 +14,7 @@ function createMapStateToProps() {
(movie, queueItem) => {
const result = _.pick(movie, [
'inCinemas',
'isAvailable',
'monitored',
'grabbed'
]);

@ -45,9 +45,25 @@ export const filters = [
}
]
},
{
key: 'missing',
label: 'Missing',
filters: [
{
key: 'monitored',
value: true,
type: filterTypes.EQUAL
},
{
key: 'hasFile',
value: false,
type: filterTypes.EQUAL
}
]
},
{
key: 'wanted',
label: 'Wanted Missing',
label: 'Wanted',
filters: [
{
key: 'monitored',
@ -58,6 +74,11 @@ export const filters = [
key: 'hasFile',
value: false,
type: filterTypes.EQUAL
},
{
key: 'isAvailable',
value: true,
type: filterTypes.EQUAL
}
]
},

Loading…
Cancel
Save