fix incorrect search items count (#224)

This commit is contained in:
Jason Dove
2021-05-28 06:13:40 -05:00
committed by GitHub
parent 95cceb95b9
commit 4c78f41c5a
8 changed files with 10 additions and 1 deletions
@@ -33,6 +33,7 @@ namespace ErsatzTV.Application.Plex.Commands
{
List<int> ids = await _mediaSourceRepository.DeleteAllPlex();
await _searchIndex.RemoveItems(ids);
_searchIndex.Commit();
await _plexSecretStore.DeleteAll();
_entityLocker.UnlockPlex();
@@ -31,6 +31,7 @@ namespace ErsatzTV.Application.Plex.Commands
var toDisable = request.Preferences.Filter(p => p.ShouldSyncItems == false).Map(p => p.Id).ToList();
List<int> ids = await _mediaSourceRepository.DisablePlexLibrarySync(toDisable);
await _searchIndex.RemoveItems(ids);
_searchIndex.Commit();
IEnumerable<int> toEnable = request.Preferences.Filter(p => p.ShouldSyncItems).Map(p => p.Id);
await _mediaSourceRepository.EnablePlexLibrarySync(toEnable);