mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 12:02:35 +02:00
Merge branch 'master' of git://github.com/markus101/NzbDrone
This commit is contained in:
commit
76dee4aff2
@ -40,27 +40,34 @@ public EpisodeProvider(IRepository sonicRepo, ISeriesProvider seriesProvider, IS
|
|||||||
_series = seriesProvider;
|
_series = seriesProvider;
|
||||||
_tvDb = tvDbProvider;
|
_tvDb = tvDbProvider;
|
||||||
_seasons = seasonProvider;
|
_seasons = seasonProvider;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public BasicEpisode GetEpisode(long id)
|
public EpisodeInfo GetEpisode(long id)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
return _sonicRepo.Single<EpisodeInfo>(e => e.EpisodeId == id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BasicEpisode UpdateEpisode(BasicEpisode episode)
|
public void UpdateEpisode(EpisodeInfo episode)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
var episodeToUpdate = _sonicRepo.Single<EpisodeInfo>(e => e.EpisodeId == episode.EpisodeId);
|
||||||
|
|
||||||
|
episodeToUpdate.AirDate = episode.AirDate;
|
||||||
|
episodeToUpdate.Overview = episode.Overview;
|
||||||
|
episodeToUpdate.Title = episode.Title;
|
||||||
|
episodeToUpdate.EpisodeNumber = episode.EpisodeNumber;
|
||||||
|
episodeToUpdate.SeasonNumber = episode.SeasonNumber;
|
||||||
|
|
||||||
|
_sonicRepo.Update<EpisodeInfo>(episodeToUpdate);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IList<BasicEpisode> GetEpisodesBySeason(long seasonId)
|
public IList<EpisodeInfo> GetEpisodesBySeason(long seasonId)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
return _sonicRepo.Find<EpisodeInfo>(e => e.SeasonId == seasonId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IList<BasicEpisode> GetEpisodeBySeries(long seriesId)
|
public IList<EpisodeInfo> GetEpisodeBySeries(long seriesId)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
return _sonicRepo.Find<EpisodeInfo>(e => e.SeriesId == seriesId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String GetSabTitle(BasicEpisode episode)
|
public String GetSabTitle(BasicEpisode episode)
|
||||||
@ -70,7 +77,6 @@ public String GetSabTitle(BasicEpisode episode)
|
|||||||
|
|
||||||
//TODO: This method should return a standard title for the sab episode.
|
//TODO: This method should return a standard title for the sab episode.
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -78,7 +84,7 @@ public String GetSabTitle(BasicEpisode episode)
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="episode">Episode that needs to be checked</param>
|
/// <param name="episode">Episode that needs to be checked</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public bool IsNeeded(BasicEpisode episode)
|
public bool IsNeeded(RemoteEpisode episode)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
@ -153,6 +159,5 @@ public static List<RemoteEpisode> Parse(string title)
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -6,10 +6,10 @@ namespace NzbDrone.Core.Providers
|
|||||||
{
|
{
|
||||||
public interface IEpisodeProvider
|
public interface IEpisodeProvider
|
||||||
{
|
{
|
||||||
BasicEpisode GetEpisode(long id);
|
EpisodeInfo GetEpisode(long id);
|
||||||
BasicEpisode UpdateEpisode(BasicEpisode episode);
|
void UpdateEpisode(EpisodeInfo episode);
|
||||||
IList<BasicEpisode> GetEpisodesBySeason(long seasonId);
|
IList<EpisodeInfo> GetEpisodesBySeason(long seasonId);
|
||||||
IList<BasicEpisode> GetEpisodeBySeries(long seriesId);
|
IList<EpisodeInfo> GetEpisodeBySeries(long seriesId);
|
||||||
String GetSabTitle(BasicEpisode episode);
|
String GetSabTitle(BasicEpisode episode);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -17,7 +17,7 @@ public interface IEpisodeProvider
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="episode">Episode that needs to be checked</param>
|
/// <param name="episode">Episode that needs to be checked</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
bool IsNeeded(BasicEpisode episode);
|
bool IsNeeded(RemoteEpisode episode);
|
||||||
|
|
||||||
void RefreshSeries(int seriesId);
|
void RefreshSeries(int seriesId);
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ namespace NzbDrone.Core.Providers
|
|||||||
public interface ISeasonProvider
|
public interface ISeasonProvider
|
||||||
{
|
{
|
||||||
Season GetSeason(int seasonId);
|
Season GetSeason(int seasonId);
|
||||||
List<Season> GetSeasongs(int seriesId);
|
List<Season> GetSeasons(int seriesId);
|
||||||
void EnsureSeason(int seriesId, int seasonId, int seasonNumber);
|
void EnsureSeason(int seriesId, int seasonId, int seasonNumber);
|
||||||
int SaveSeason(Season season);
|
int SaveSeason(Season season);
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ public Season GetSeason(int seasonId)
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Season> GetSeasongs(int seriesId)
|
public List<Season> GetSeasons(int seriesId)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user