enable plex for movies (#72)
* re-enable plex, temp force secure connections * add plex fanart * synchronize genre from plex * fix plex library sync * improve stream error handling * synchronize plex artwork * use switch instead of button * prioritize local connections for insecure plex sources * sign out of plex * better plex sign in/out * code cleanup * fix plex movie aspect ratio and scan type
This commit is contained in:
@@ -160,14 +160,23 @@ namespace ErsatzTV.Infrastructure.Data.Repositories
|
||||
await context.SaveChangesAsync();
|
||||
}
|
||||
|
||||
public async Task Delete(int id)
|
||||
public async Task Delete(int mediaSourceId)
|
||||
{
|
||||
await using TvContext context = _dbContextFactory.CreateDbContext();
|
||||
MediaSource mediaSource = await context.MediaSources.FindAsync(id);
|
||||
MediaSource mediaSource = await context.MediaSources.FindAsync(mediaSourceId);
|
||||
context.MediaSources.Remove(mediaSource);
|
||||
await context.SaveChangesAsync();
|
||||
}
|
||||
|
||||
public async Task<Unit> DeleteAllPlex()
|
||||
{
|
||||
await using TvContext context = _dbContextFactory.CreateDbContext();
|
||||
List<PlexMediaSource> allMediaSources = await context.PlexMediaSources.ToListAsync();
|
||||
context.PlexMediaSources.RemoveRange(allMediaSources);
|
||||
await context.SaveChangesAsync();
|
||||
return Unit.Default;
|
||||
}
|
||||
|
||||
public async Task DisablePlexLibrarySync(List<int> libraryIds)
|
||||
{
|
||||
await _dbConnection.ExecuteAsync(
|
||||
|
||||
Reference in New Issue
Block a user