|
|
@ -34,17 +34,17 @@ namespace NzbDrone.Core.Providers
|
|
|
|
|
|
|
|
|
|
|
|
public virtual Episode GetEpisode(long id)
|
|
|
|
public virtual Episode GetEpisode(long id)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return _database.Single<Episode>(id);
|
|
|
|
return _database.SingleOrDefault<Episode>(id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public virtual Episode GetEpisode(int seriesId, int seasonNumber, int episodeNumber)
|
|
|
|
public virtual Episode GetEpisode(int seriesId, int seasonNumber, int episodeNumber)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return _database.Single<Episode>("WHERE SeriesId = @0 AND SeasonNumber = @1 AND EpisodeNumber = @2", seriesId, seasonNumber, episodeNumber);
|
|
|
|
return _database.SingleOrDefault<Episode>("WHERE SeriesId = @0 AND SeasonNumber = @1 AND EpisodeNumber = @2", seriesId, seasonNumber, episodeNumber);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public virtual Episode GetEpisode(int seriesId, DateTime date)
|
|
|
|
public virtual Episode GetEpisode(int seriesId, DateTime date)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return _database.Single<Episode>("WHERE SeriesId = @0 AND AirDate = @1", seriesId, date.Date);
|
|
|
|
return _database.SingleOrDefault<Episode>("WHERE SeriesId = @0 AND AirDate = @1", seriesId, date.Date);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public virtual IList<Episode> GetEpisodeBySeries(long seriesId)
|
|
|
|
public virtual IList<Episode> GetEpisodeBySeries(long seriesId)
|
|
|
|