@page "/media/sources/jellyfin" @using ErsatzTV.Application.Jellyfin @using ErsatzTV.Core.Interfaces.Jellyfin @using ErsatzTV.Core.Jellyfin @implements IDisposable @inject IJellyfinSecretStore JellyfinSecretStore @inject ChannelWriter ScannerWorkerChannel @code { private readonly CancellationTokenSource _cts = new(); public void Dispose() { _cts.Cancel(); _cts.Dispose(); } private async Task RefreshLibraries(int mediaSourceId) => await ScannerWorkerChannel.WriteAsync(new SynchronizeJellyfinLibraries(mediaSourceId), _cts.Token); }