New: Added tvdb Upcoming series status

This commit is contained in:
Taloth Saldono 2020-01-12 21:09:58 +01:00
parent d3cd46bb51
commit d8446c2d5a
4 changed files with 25 additions and 2 deletions
frontend/src
AddSeries/AddNewSeries
Components/Filter/Builder
Series
src/NzbDrone.Core/MetadataSource/SkyHook

View File

@ -165,6 +165,17 @@ class AddNewSeriesSearchResult extends Component {
</Label> :
null
}
{
status === 'upcoming' ?
<Label
kind={kinds.INFO}
size={sizes.LARGE}
>
Upcoming
</Label> :
null
}
</div>
<div className={styles.overview}>

View File

@ -1,15 +1,16 @@
import React from 'react';
import FilterBuilderRowValue from './FilterBuilderRowValue';
const protocols = [
const seriesStatusList = [
{ id: 'continuing', name: 'Continuing' },
{ id: 'upcoming', name: 'Upcoming' },
{ id: 'ended', name: 'Ended' }
];
function SeriesStatusFilterBuilderRowValue(props) {
return (
<FilterBuilderRowValue
tagList={protocols}
tagList={seriesStatusList}
{...props}
/>
);

View File

@ -21,6 +21,12 @@ export function getSeriesStatusDetails(status) {
title: 'Ended',
message: 'No additional episodes or or another season is expected'
};
} else if (status === 'upcoming') {
statusDetails = {
icon: icons.SERIES_CONTINUING,
title: 'Upcoming',
message: 'Series has been announced but no exact air date yet'
};
}
return statusDetails;

View File

@ -244,6 +244,11 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
return SeriesStatusType.Ended;
}
if (status.Equals("upcoming", StringComparison.InvariantCultureIgnoreCase))
{
return SeriesStatusType.Upcoming;
}
return SeriesStatusType.Continuing;
}