mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
Added basic episode support
This commit is contained in:
parent
606140832d
commit
81e155ae42
33 changed files with 458 additions and 290 deletions
54
NzbDrone.Core/Providers/SeasonProvider.cs
Normal file
54
NzbDrone.Core/Providers/SeasonProvider.cs
Normal file
|
@ -0,0 +1,54 @@
|
|||
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> 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
|
||||
Logger.Debug("Creating Season. SeriesID:{0} SeasonID:{1} SeasonNumber:{2} Folder:{3}", seriesId, seasonId, seasonNumber, string.Empty);
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue