add button to refresh list of libraries (#226)
* add button to refresh list of libraries * code cleanup
This commit is contained in:
@@ -206,7 +206,7 @@ namespace ErsatzTV.Infrastructure.Data.Repositories
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<Unit> UpdateLibraries(
|
||||
public async Task<List<int>> UpdateLibraries(
|
||||
int plexMediaSourceId,
|
||||
List<PlexLibrary> toAdd,
|
||||
List<PlexLibrary> toDelete)
|
||||
@@ -228,12 +228,14 @@ namespace ErsatzTV.Infrastructure.Data.Repositories
|
||||
dbContext.Entry(delete).State = EntityState.Deleted;
|
||||
}
|
||||
|
||||
List<int> ids = await DisablePlexLibrarySync(toDelete.Map(l => l.Id).ToList());
|
||||
|
||||
await dbContext.SaveChangesAsync();
|
||||
|
||||
return Unit.Default;
|
||||
return ids;
|
||||
}
|
||||
|
||||
public async Task<Unit> UpdateLibraries(
|
||||
public async Task<List<int>> UpdateLibraries(
|
||||
int jellyfinMediaSourceId,
|
||||
List<JellyfinLibrary> toAdd,
|
||||
List<JellyfinLibrary> toDelete)
|
||||
@@ -255,12 +257,14 @@ namespace ErsatzTV.Infrastructure.Data.Repositories
|
||||
dbContext.Entry(delete).State = EntityState.Deleted;
|
||||
}
|
||||
|
||||
List<int> ids = await DisableJellyfinLibrarySync(toDelete.Map(l => l.Id).ToList());
|
||||
|
||||
await dbContext.SaveChangesAsync();
|
||||
|
||||
return Unit.Default;
|
||||
return ids;
|
||||
}
|
||||
|
||||
public async Task<Unit> UpdateLibraries(
|
||||
public async Task<List<int>> UpdateLibraries(
|
||||
int embyMediaSourceId,
|
||||
List<EmbyLibrary> toAdd,
|
||||
List<EmbyLibrary> toDelete)
|
||||
@@ -282,9 +286,11 @@ namespace ErsatzTV.Infrastructure.Data.Repositories
|
||||
dbContext.Entry(delete).State = EntityState.Deleted;
|
||||
}
|
||||
|
||||
List<int> ids = await DisableEmbyLibrarySync(toDelete.Map(l => l.Id).ToList());
|
||||
|
||||
await dbContext.SaveChangesAsync();
|
||||
|
||||
return Unit.Default;
|
||||
return ids;
|
||||
}
|
||||
|
||||
public async Task<Unit> UpdatePathReplacements(
|
||||
|
||||
@@ -71,6 +71,9 @@ namespace ErsatzTV.Infrastructure.Locking
|
||||
|
||||
public bool IsPlexLocked() => _plex;
|
||||
|
||||
public bool IsRemoteMediaSourceLocked<TMediaSource>() =>
|
||||
_lockedRemoteMediaSourceTypes.ContainsKey(typeof(TMediaSource));
|
||||
|
||||
public bool LockRemoteMediaSource<TMediaSource>()
|
||||
{
|
||||
Type mediaSourceType = typeof(TMediaSource);
|
||||
|
||||
Reference in New Issue
Block a user