fix mysql playout builds (#2352)

* more cancellation tokens and fixes

* so much cancellation token

* fix mysql playout builds
This commit is contained in:
Jason Dove
2025-08-27 18:09:56 +00:00
committed by GitHub
parent 1c07df5bc3
commit 9462156148
103 changed files with 2628 additions and 1666 deletions
+3 -13
View File
@@ -2,7 +2,6 @@
@using ErsatzTV.Application.Emby
@using ErsatzTV.Core.Emby
@using ErsatzTV.Core.Interfaces.Emby
@implements IDisposable
@inject IEmbySecretStore EmbySecretStore
@inject ChannelWriter<IScannerBackgroundServiceRequest> ScannerWorkerChannel
@@ -13,19 +12,10 @@
Name="Emby"
GetAllMediaSourcesCommand="@(new GetAllEmbyMediaSources())"
DisconnectCommand="@(new DisconnectEmby())"
RefreshLibrariesCommand="@(mediaSourceId => RefreshLibraries(mediaSourceId))"
RefreshLibrariesCommand="@RefreshLibraries"
SecretStore="@EmbySecretStore"/>
@code {
private readonly CancellationTokenSource _cts = new();
public void Dispose()
{
_cts.Cancel();
_cts.Dispose();
}
private async Task RefreshLibraries(int mediaSourceId) =>
await ScannerWorkerChannel.WriteAsync(new SynchronizeEmbyLibraries(mediaSourceId), _cts.Token);
private async Task RefreshLibraries(int mediaSourceId, CancellationToken cancellationToken) =>
await ScannerWorkerChannel.WriteAsync(new SynchronizeEmbyLibraries(mediaSourceId), cancellationToken);
}