2013-08-27 03:20:03 +00:00
|
|
|
|
using System;
|
2013-03-03 22:26:41 +00:00
|
|
|
|
using System.Collections.Generic;
|
2012-02-21 03:25:19 +00:00
|
|
|
|
using System.Linq;
|
|
|
|
|
using NLog;
|
2013-04-24 01:56:00 +00:00
|
|
|
|
using NzbDrone.Common.Messaging;
|
2013-08-05 09:09:41 +00:00
|
|
|
|
using NzbDrone.Core.DecisionEngine.Specifications;
|
2013-03-03 22:26:41 +00:00
|
|
|
|
using NzbDrone.Core.Tv.Events;
|
2012-02-21 03:25:19 +00:00
|
|
|
|
|
2013-02-19 06:01:03 +00:00
|
|
|
|
namespace NzbDrone.Core.Tv
|
2012-02-21 03:25:19 +00:00
|
|
|
|
{
|
2013-02-20 02:05:15 +00:00
|
|
|
|
public interface ISeasonService
|
2012-02-21 03:25:19 +00:00
|
|
|
|
{
|
2013-03-03 22:26:41 +00:00
|
|
|
|
List<Season> GetSeasonsBySeries(int seriesId);
|
2013-02-20 02:05:15 +00:00
|
|
|
|
}
|
2012-02-21 03:25:19 +00:00
|
|
|
|
|
2013-09-10 05:22:38 +00:00
|
|
|
|
public class SeasonService : ISeasonService
|
2013-02-20 02:05:15 +00:00
|
|
|
|
{
|
|
|
|
|
private readonly ISeasonRepository _seasonRepository;
|
|
|
|
|
private readonly Logger _logger;
|
2012-02-21 03:25:19 +00:00
|
|
|
|
|
2013-09-10 06:38:25 +00:00
|
|
|
|
public SeasonService(ISeasonRepository seasonRepository, Logger logger)
|
2012-02-21 03:25:19 +00:00
|
|
|
|
{
|
2013-02-20 02:05:15 +00:00
|
|
|
|
_seasonRepository = seasonRepository;
|
|
|
|
|
_logger = logger;
|
2012-02-21 03:25:19 +00:00
|
|
|
|
}
|
|
|
|
|
|
2013-03-03 22:26:41 +00:00
|
|
|
|
public List<Season> GetSeasonsBySeries(int seriesId)
|
|
|
|
|
{
|
|
|
|
|
return _seasonRepository.GetSeasonBySeries(seriesId);
|
|
|
|
|
}
|
2013-02-20 02:05:15 +00:00
|
|
|
|
}
|
2012-02-21 03:25:19 +00:00
|
|
|
|
} |