mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Fix: use isAvailable to determine if a movie is available.
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import isBefore from 'Utilities/Date/isBefore';
|
|
||||||
import { icons, kinds, sizes } from 'Helpers/Props';
|
import { icons, kinds, sizes } from 'Helpers/Props';
|
||||||
import Icon from 'Components/Icon';
|
import Icon from 'Components/Icon';
|
||||||
import ProgressBar from 'Components/ProgressBar';
|
import ProgressBar from 'Components/ProgressBar';
|
||||||
@@ -30,6 +29,7 @@ function getTooltip(title, quality, size) {
|
|||||||
function MovieStatus(props) {
|
function MovieStatus(props) {
|
||||||
const {
|
const {
|
||||||
inCinemas,
|
inCinemas,
|
||||||
|
isAvailable,
|
||||||
monitored,
|
monitored,
|
||||||
grabbed,
|
grabbed,
|
||||||
queueItem,
|
queueItem,
|
||||||
@@ -38,7 +38,7 @@ function MovieStatus(props) {
|
|||||||
|
|
||||||
const hasMovieFile = !!movieFile;
|
const hasMovieFile = !!movieFile;
|
||||||
const isQueued = !!queueItem;
|
const isQueued = !!queueItem;
|
||||||
const hasReleased = isBefore(inCinemas);
|
const hasReleased = isAvailable;
|
||||||
|
|
||||||
if (isQueued) {
|
if (isQueued) {
|
||||||
const {
|
const {
|
||||||
@@ -144,6 +144,7 @@ function MovieStatus(props) {
|
|||||||
|
|
||||||
MovieStatus.propTypes = {
|
MovieStatus.propTypes = {
|
||||||
inCinemas: PropTypes.string,
|
inCinemas: PropTypes.string,
|
||||||
|
isAvailable: PropTypes.bool,
|
||||||
monitored: PropTypes.bool.isRequired,
|
monitored: PropTypes.bool.isRequired,
|
||||||
grabbed: PropTypes.bool,
|
grabbed: PropTypes.bool,
|
||||||
queueItem: PropTypes.object,
|
queueItem: PropTypes.object,
|
||||||
|
@@ -14,6 +14,7 @@ function createMapStateToProps() {
|
|||||||
(movie, queueItem) => {
|
(movie, queueItem) => {
|
||||||
const result = _.pick(movie, [
|
const result = _.pick(movie, [
|
||||||
'inCinemas',
|
'inCinemas',
|
||||||
|
'isAvailable',
|
||||||
'monitored',
|
'monitored',
|
||||||
'grabbed'
|
'grabbed'
|
||||||
]);
|
]);
|
||||||
|
@@ -46,8 +46,8 @@ export const filters = [
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'wanted',
|
key: 'missing',
|
||||||
label: 'Wanted Missing',
|
label: 'Missing',
|
||||||
filters: [
|
filters: [
|
||||||
{
|
{
|
||||||
key: 'monitored',
|
key: 'monitored',
|
||||||
@@ -61,6 +61,27 @@ export const filters = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: 'wanted',
|
||||||
|
label: 'Wanted',
|
||||||
|
filters: [
|
||||||
|
{
|
||||||
|
key: 'monitored',
|
||||||
|
value: true,
|
||||||
|
type: filterTypes.EQUAL
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'hasFile',
|
||||||
|
value: false,
|
||||||
|
type: filterTypes.EQUAL
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'isAvailable',
|
||||||
|
value: true,
|
||||||
|
type: filterTypes.EQUAL
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: 'cutoffunmet',
|
key: 'cutoffunmet',
|
||||||
label: 'Cut-off Unmet',
|
label: 'Cut-off Unmet',
|
||||||
|
Reference in New Issue
Block a user