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

View File

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

View File

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

View File

@ -21,6 +21,12 @@ export function getSeriesStatusDetails(status) {
title: 'Ended', title: 'Ended',
message: 'No additional episodes or or another season is expected' 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; return statusDetails;

View File

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