You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
850 B
32 lines
850 B
12 years ago
|
using NzbDrone.Core.Tv;
|
||
12 years ago
|
|
||
12 years ago
|
namespace NzbDrone.Core.DataAugmentation.DailySeries
|
||
12 years ago
|
{
|
||
|
public class DailySeriesService
|
||
|
{
|
||
12 years ago
|
private readonly IDailySeriesDataProxy _proxy;
|
||
|
private readonly ISeriesService _seriesService;
|
||
12 years ago
|
|
||
12 years ago
|
public DailySeriesService(IDailySeriesDataProxy proxy, ISeriesService seriesService)
|
||
12 years ago
|
{
|
||
12 years ago
|
_proxy = proxy;
|
||
|
_seriesService = seriesService;
|
||
12 years ago
|
}
|
||
|
|
||
|
public virtual void UpdateDailySeries()
|
||
|
{
|
||
12 years ago
|
var dailySeries = _proxy.GetDailySeriesIds();
|
||
12 years ago
|
|
||
12 years ago
|
foreach (var tvdbId in dailySeries)
|
||
12 years ago
|
{
|
||
12 years ago
|
var series = _seriesService.FindByTvdbId(tvdbId);
|
||
12 years ago
|
|
||
12 years ago
|
if (series != null)
|
||
|
{
|
||
12 years ago
|
_seriesService.SetSeriesType(series.Id, SeriesTypes.Daily);
|
||
12 years ago
|
}
|
||
12 years ago
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|