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