Cleaned up season service/repo
This commit is contained in:
parent
97eb5ffc61
commit
d8928d655d
|
@ -114,11 +114,6 @@ namespace NzbDrone.Core.Tv
|
|||
|
||||
private static bool GetMonitoredStatus(Episode episode, IEnumerable<Season> seasons)
|
||||
{
|
||||
if (episode.SeasonNumber == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (episode.EpisodeNumber == 0 && episode.SeasonNumber != 1)
|
||||
{
|
||||
return false;
|
||||
|
|
|
@ -8,8 +8,6 @@ namespace NzbDrone.Core.Tv
|
|||
{
|
||||
public interface ISeasonRepository : IBasicRepository<Series>
|
||||
{
|
||||
Season Get(int seriesId, int seasonNumber);
|
||||
bool IsMonitored(int seriesId, int seasonNumber);
|
||||
List<Season> GetSeasonBySeries(int seriesId);
|
||||
}
|
||||
|
||||
|
@ -20,18 +18,6 @@ namespace NzbDrone.Core.Tv
|
|||
{
|
||||
}
|
||||
|
||||
public Season Get(int seriesId, int seasonNumber)
|
||||
{
|
||||
var series = Query.Single(s => s.Id == seriesId);
|
||||
return series.Seasons.Single(s => s.SeasonNumber == seasonNumber);
|
||||
}
|
||||
|
||||
public bool IsMonitored(int seriesId, int seasonNumber)
|
||||
{
|
||||
var series = Query.Single(s => s.Id == seriesId);
|
||||
return series.Seasons.Single(s => s.SeasonNumber == seasonNumber).Monitored;
|
||||
}
|
||||
|
||||
public List<Season> GetSeasonBySeries(int seriesId)
|
||||
{
|
||||
return Query.Single(s => s.Id == seriesId).Seasons;
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue