1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-14 06:52:36 +01:00
Radarr/NzbDrone.Core/Providers/SeasonProvider.cs

54 lines
1.5 KiB
C#
Raw Normal View History

2010-10-05 08:21:18 +02:00
using System;
using System.Collections.Generic;
using NLog;
using NzbDrone.Core.Entities;
2010-10-05 08:21:18 +02:00
using SubSonic.Repository;
namespace NzbDrone.Core.Providers
{
class SeasonProvider : ISeasonProvider
{
private readonly IRepository _sonicRepo;
private static readonly Logger Logger = NLog.LogManager.GetCurrentClassLogger();
public SeasonProvider(IRepository dataRepository)
{
_sonicRepo = dataRepository;
}
public Season GetSeason(int seasonId)
{
throw new NotImplementedException();
}
public List<Season> GetSeasongs(int seriesId)
{
throw new NotImplementedException();
}
public void EnsureSeason(int seriesId, int seasonId, int seasonNumber)
{
if (_sonicRepo.Exists<Season>(s => s.SeasonId == seasonId))
return;
//TODO: Calculate Season Folder
2010-10-08 00:17:24 +02:00
Logger.Debug("Adding Season To DB. [SeriesID:{0} SeasonID:{1} SeasonNumber:{2} Folder:{3}]", seriesId, seasonId, seasonNumber, "????");
2010-10-05 08:21:18 +02:00
var newSeason = new Season()
{
Folder = String.Empty,
Monitored = true,
SeasonId = seasonId,
SeasonNumber = seasonNumber,
SeriesId = seriesId
};
_sonicRepo.Add<Season>(newSeason);
}
public int SaveSeason(Season season)
{
throw new NotImplementedException();
}
}
}