mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-04 10:02:40 +01:00
bf1ff29519
commited somewhere between vancouver and vegas @ 2135ft. Alt and 480mph.
53 lines
1.4 KiB
C#
53 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using NLog;
|
|
using NzbDrone.Core.Repository;
|
|
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> GetSeasons(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
|
|
Logger.Trace("Adding Season To DB. [SeriesID:{0} SeasonID:{1} SeasonNumber:{2}]", seriesId, seasonId, seasonNumber, "????");
|
|
|
|
var newSeason = new Season()
|
|
{
|
|
Monitored = true,
|
|
SeasonId = seasonId,
|
|
SeasonNumber = seasonNumber,
|
|
SeriesId = seriesId
|
|
};
|
|
_sonicRepo.Add<Season>(newSeason);
|
|
}
|
|
|
|
|
|
|
|
public int SaveSeason(Season season)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
} |