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:
Jason Dove
2021-03-13 21:04:54 +00:00
committed by GitHub
parent a13f964200
commit aa938baec8
35 changed files with 602 additions and 132 deletions
@@ -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(