mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 21:33:15 -07:00
Fixed the outstanding issue on #1995
This commit is contained in:
parent
b015b101ed
commit
a7bc93889b
6 changed files with 29 additions and 10 deletions
|
@ -19,5 +19,8 @@ namespace Ombi.Store.Repository
|
|||
Task AddRange(IEnumerable<PlexEpisode> content);
|
||||
IEnumerable<PlexServerContent> GetWhereContentByCustom(Expression<Func<PlexServerContent, bool>> predicate);
|
||||
Task<PlexServerContent> GetFirstContentByCustom(Expression<Func<PlexServerContent, bool>> predicate);
|
||||
Task DeleteEpisode(PlexEpisode content);
|
||||
void DeleteWithoutSave(PlexServerContent content);
|
||||
void DeleteWithoutSave(PlexEpisode content);
|
||||
}
|
||||
}
|
|
@ -103,12 +103,29 @@ namespace Ombi.Store.Repository
|
|||
return Db.PlexEpisode.Include(x => x.Series).AsQueryable();
|
||||
}
|
||||
|
||||
public void DeleteWithoutSave(PlexServerContent content)
|
||||
{
|
||||
Db.PlexServerContent.Remove(content);
|
||||
}
|
||||
|
||||
public void DeleteWithoutSave(PlexEpisode content)
|
||||
{
|
||||
Db.PlexEpisode.Remove(content);
|
||||
}
|
||||
|
||||
public async Task<PlexEpisode> Add(PlexEpisode content)
|
||||
{
|
||||
await Db.PlexEpisode.AddAsync(content);
|
||||
await Db.SaveChangesAsync();
|
||||
return content;
|
||||
}
|
||||
|
||||
public async Task DeleteEpisode(PlexEpisode content)
|
||||
{
|
||||
Db.PlexEpisode.Remove(content);
|
||||
await Db.SaveChangesAsync();
|
||||
}
|
||||
|
||||
public async Task<PlexEpisode> GetEpisodeByKey(int key)
|
||||
{
|
||||
return await Db.PlexEpisode.FirstOrDefaultAsync(x => x.Key == key);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue