public async Task <Either <BaseError, Unit> > Handle( DisconnectEmby request, CancellationToken cancellationToken) { List <int> ids = await _mediaSourceRepository.DeleteAllEmby(); await _searchIndex.RemoveItems(ids); _searchIndex.Commit(); await _embySecretStore.DeleteAll(); _entityLocker.UnlockRemoteMediaSource <EmbyMediaSource>(); return(Unit.Default); }