parent
9eb24cedd6
commit
924f6ca715
|
@ -3,6 +3,7 @@ const monitorOptions = [
|
||||||
{ key: 'future', value: 'Future Episodes' },
|
{ key: 'future', value: 'Future Episodes' },
|
||||||
{ key: 'missing', value: 'Missing Episodes' },
|
{ key: 'missing', value: 'Missing Episodes' },
|
||||||
{ key: 'existing', value: 'Existing Episodes' },
|
{ key: 'existing', value: 'Existing Episodes' },
|
||||||
|
{ key: 'pilot', value: 'Pilot Episode' },
|
||||||
{ key: 'firstSeason', value: 'Only First Season' },
|
{ key: 'firstSeason', value: 'Only First Season' },
|
||||||
{ key: 'latestSeason', value: 'Only Latest Season' },
|
{ key: 'latestSeason', value: 'Only Latest Season' },
|
||||||
{ key: 'none', value: 'None' }
|
{ key: 'none', value: 'None' }
|
||||||
|
|
|
@ -70,6 +70,13 @@ namespace NzbDrone.Core.Tv
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case MonitorTypes.Pilot:
|
||||||
|
_logger.Debug("[{0}] Monitoring first episode episodes", series.Title);
|
||||||
|
ToggleEpisodesMonitoredState(episodes,
|
||||||
|
e => e.SeasonNumber > 0 && e.SeasonNumber == firstSeason && e.EpisodeNumber == 1);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
case MonitorTypes.FirstSeason:
|
case MonitorTypes.FirstSeason:
|
||||||
_logger.Debug("[{0}] Monitoring first season episodes", series.Title);
|
_logger.Debug("[{0}] Monitoring first season episodes", series.Title);
|
||||||
ToggleEpisodesMonitoredState(episodes, e => e.SeasonNumber > 0 && e.SeasonNumber == firstSeason);
|
ToggleEpisodesMonitoredState(episodes, e => e.SeasonNumber > 0 && e.SeasonNumber == firstSeason);
|
||||||
|
@ -77,7 +84,6 @@ namespace NzbDrone.Core.Tv
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MonitorTypes.LatestSeason:
|
case MonitorTypes.LatestSeason:
|
||||||
|
|
||||||
if (episodes.Where(e => e.SeasonNumber == lastSeason)
|
if (episodes.Where(e => e.SeasonNumber == lastSeason)
|
||||||
.All(e => e.AirDateUtc.HasValue &&
|
.All(e => e.AirDateUtc.HasValue &&
|
||||||
e.AirDateUtc.Value.Before(DateTime.UtcNow) &&
|
e.AirDateUtc.Value.Before(DateTime.UtcNow) &&
|
||||||
|
@ -114,7 +120,10 @@ namespace NzbDrone.Core.Tv
|
||||||
// - Not specials
|
// - Not specials
|
||||||
// - The latest season
|
// - The latest season
|
||||||
// - Not only supposed to monitor the first season
|
// - Not only supposed to monitor the first season
|
||||||
if (seasonNumber > 0 && seasonNumber == lastSeason && monitoringOptions.Monitor != MonitorTypes.FirstSeason)
|
if (seasonNumber > 0 &&
|
||||||
|
seasonNumber == lastSeason &&
|
||||||
|
monitoringOptions.Monitor != MonitorTypes.FirstSeason &&
|
||||||
|
monitoringOptions.Monitor != MonitorTypes.Pilot)
|
||||||
{
|
{
|
||||||
season.Monitored = true;
|
season.Monitored = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ namespace NzbDrone.Core.Tv
|
||||||
Existing,
|
Existing,
|
||||||
FirstSeason,
|
FirstSeason,
|
||||||
LatestSeason,
|
LatestSeason,
|
||||||
|
Pilot,
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue