Minor improvements (#9156)

This commit is contained in:
Bond-009 2023-01-23 19:39:10 +01:00 committed by GitHub
parent 2a70cf115c
commit 232453014f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View File

@ -248,10 +248,10 @@ namespace Jellyfin.Api.Controllers
{
var item = _libraryManager.GetItemById(itemId);
_logger.LogInformation(
"Setting provider id's to item {0}-{1}: {2}",
"Setting provider id's to item {ItemId}-{ItemName}: {@ProviderIds}",
item.Id,
item.Name,
JsonSerializer.Serialize(searchResult.ProviderIds));
searchResult.ProviderIds);
// Since the refresh process won't erase provider Ids, we need to set this explicitly now.
item.ProviderIds = searchResult.ProviderIds;

View File

@ -64,21 +64,21 @@ namespace Jellyfin.Api.WebSocketListeners
base.Dispose(dispose);
}
private void OnTaskCompleted(object? sender, TaskCompletionEventArgs e)
private async void OnTaskCompleted(object? sender, TaskCompletionEventArgs e)
{
SendData(true);
e.Task.TaskProgress -= OnTaskProgress;
await SendData(true).ConfigureAwait(false);
}
private void OnTaskExecuting(object? sender, GenericEventArgs<IScheduledTaskWorker> e)
private async void OnTaskExecuting(object? sender, GenericEventArgs<IScheduledTaskWorker> e)
{
SendData(true);
await SendData(true).ConfigureAwait(false);
e.Argument.TaskProgress += OnTaskProgress;
}
private void OnTaskProgress(object? sender, GenericEventArgs<double> e)
private async void OnTaskProgress(object? sender, GenericEventArgs<double> e)
{
SendData(false);
await SendData(false).ConfigureAwait(false);
}
}
}