1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-25 01:11:43 +00:00

Merge branch 'master' of git://github.com/markus101/NzbDrone

This commit is contained in:
Keivan 2010-10-11 18:15:08 -07:00
commit 76dee4aff2
4 changed files with 24 additions and 19 deletions

View file

@ -40,27 +40,34 @@ public EpisodeProvider(IRepository sonicRepo, ISeriesProvider seriesProvider, IS
_series = seriesProvider;
_tvDb = tvDbProvider;
_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)
@ -70,7 +77,6 @@ public String GetSabTitle(BasicEpisode episode)
//TODO: This method should return a standard title for the sab episode.
throw new NotImplementedException();
}
/// <summary>
@ -78,7 +84,7 @@ public String GetSabTitle(BasicEpisode episode)
/// </summary>
/// <param name="episode">Episode that needs to be checked</param>
/// <returns></returns>
public bool IsNeeded(BasicEpisode episode)
public bool IsNeeded(RemoteEpisode episode)
{
throw new NotImplementedException();
}
@ -153,6 +159,5 @@ public static List<RemoteEpisode> Parse(string title)
return result;
}
}
}

View file

@ -6,10 +6,10 @@ namespace NzbDrone.Core.Providers
{
public interface IEpisodeProvider
{
BasicEpisode GetEpisode(long id);
BasicEpisode UpdateEpisode(BasicEpisode episode);
IList<BasicEpisode> GetEpisodesBySeason(long seasonId);
IList<BasicEpisode> GetEpisodeBySeries(long seriesId);
EpisodeInfo GetEpisode(long id);
void UpdateEpisode(EpisodeInfo episode);
IList<EpisodeInfo> GetEpisodesBySeason(long seasonId);
IList<EpisodeInfo> GetEpisodeBySeries(long seriesId);
String GetSabTitle(BasicEpisode episode);
/// <summary>
@ -17,7 +17,7 @@ public interface IEpisodeProvider
/// </summary>
/// <param name="episode">Episode that needs to be checked</param>
/// <returns></returns>
bool IsNeeded(BasicEpisode episode);
bool IsNeeded(RemoteEpisode episode);
void RefreshSeries(int seriesId);
}

View file

@ -6,7 +6,7 @@ namespace NzbDrone.Core.Providers
public interface ISeasonProvider
{
Season GetSeason(int seasonId);
List<Season> GetSeasongs(int seriesId);
List<Season> GetSeasons(int seriesId);
void EnsureSeason(int seriesId, int seasonId, int seasonNumber);
int SaveSeason(Season season);
}

View file

@ -21,7 +21,7 @@ public Season GetSeason(int seasonId)
throw new NotImplementedException();
}
public List<Season> GetSeasongs(int seriesId)
public List<Season> GetSeasons(int seriesId)
{
throw new NotImplementedException();
}