mirror of
https://github.com/Radarr/Radarr
synced 2024-12-26 09:49:00 +00:00
Reverted back to Single<T> instead of SingleOrDefault<T> except when searching for an episode in DB.
This commit is contained in:
parent
514998042e
commit
5c055ebb9a
4 changed files with 4 additions and 4 deletions
|
@ -34,7 +34,7 @@ public virtual void AddEpisode(Episode episode)
|
||||||
|
|
||||||
public virtual Episode GetEpisode(long id)
|
public virtual Episode GetEpisode(long id)
|
||||||
{
|
{
|
||||||
return _database.SingleOrDefault<Episode>(id);
|
return _database.Single<Episode>(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual Episode GetEpisode(int seriesId, int seasonNumber, int episodeNumber)
|
public virtual Episode GetEpisode(int seriesId, int seasonNumber, int episodeNumber)
|
||||||
|
|
|
@ -54,7 +54,7 @@ public virtual void SaveSettings(IndexerSetting settings)
|
||||||
|
|
||||||
public virtual IndexerSetting GetSettings(Type type)
|
public virtual IndexerSetting GetSettings(Type type)
|
||||||
{
|
{
|
||||||
return _database.SingleOrDefault<IndexerSetting>("WHERE IndexProviderType = @0", type.ToString());
|
return _database.Single<IndexerSetting>("WHERE IndexProviderType = @0", type.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void InitializeIndexers(IList<IndexerBase> indexers)
|
public virtual void InitializeIndexers(IList<IndexerBase> indexers)
|
||||||
|
|
|
@ -196,7 +196,7 @@ public virtual void Update(EpisodeFile episodeFile)
|
||||||
|
|
||||||
public virtual EpisodeFile GetEpisodeFile(int episodeFileId)
|
public virtual EpisodeFile GetEpisodeFile(int episodeFileId)
|
||||||
{
|
{
|
||||||
return _database.SingleOrDefault<EpisodeFile>(episodeFileId);
|
return _database.Single<EpisodeFile>(episodeFileId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual List<EpisodeFile> GetEpisodeFiles()
|
public virtual List<EpisodeFile> GetEpisodeFiles()
|
||||||
|
|
|
@ -53,7 +53,7 @@ public virtual List<QualityProfile> GetAllProfiles()
|
||||||
|
|
||||||
public virtual QualityProfile Get(int profileId)
|
public virtual QualityProfile Get(int profileId)
|
||||||
{
|
{
|
||||||
return _database.SingleOrDefault<QualityProfile>(profileId);
|
return _database.Single<QualityProfile>(profileId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void SetupDefaultProfiles()
|
public virtual void SetupDefaultProfiles()
|
||||||
|
|
Loading…
Reference in a new issue