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