mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 22:07:13 -04:00
Remember to await the async task
This commit is contained in:
parent
3c5bbeb80c
commit
dd238937f4
@ -229,7 +229,7 @@ namespace MediaBrowser.Providers.Manager
|
|||||||
await result.Item.UpdateToRepositoryAsync(reason, cancellationToken).ConfigureAwait(false);
|
await result.Item.UpdateToRepositoryAsync(reason, cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Task SavePeopleMetadataAsync(List<PersonInfo> people, LibraryOptions libraryOptions, CancellationToken cancellationToken)
|
private async Task SavePeopleMetadataAsync(List<PersonInfo> people, LibraryOptions libraryOptions, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
var personsToSave = new List<BaseItem>();
|
var personsToSave = new List<BaseItem>();
|
||||||
var personsToSaveWithImages = new List<BaseItem>();
|
var personsToSaveWithImages = new List<BaseItem>();
|
||||||
@ -267,11 +267,10 @@ namespace MediaBrowser.Providers.Manager
|
|||||||
|
|
||||||
// This is a little ugly, but it saves a lot of I/O with the db by doing this in bulk.
|
// This is a little ugly, but it saves a lot of I/O with the db by doing this in bulk.
|
||||||
// To avoid updating images for no reason, we differentiate between the two item update types.
|
// To avoid updating images for no reason, we differentiate between the two item update types.
|
||||||
LibraryManager.RunMetadataSavers(personsToSave, ItemUpdateType.MetadataDownload);
|
await LibraryManager.RunMetadataSavers(personsToSave, ItemUpdateType.MetadataDownload).ConfigureAwait(false);
|
||||||
LibraryManager.RunMetadataSavers(personsToSaveWithImages, ItemUpdateType.ImageUpdate);
|
await LibraryManager.RunMetadataSavers(personsToSaveWithImages, ItemUpdateType.ImageUpdate).ConfigureAwait(false);
|
||||||
|
|
||||||
LibraryManager.CreateItems(personsToSave.Concat(personsToSaveWithImages).ToList(), null, CancellationToken.None);
|
LibraryManager.CreateItems(personsToSave.Concat(personsToSaveWithImages).ToList(), null, CancellationToken.None);
|
||||||
return Task.CompletedTask;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual Task AfterMetadataRefresh(TItemType item, MetadataRefreshOptions refreshOptions, CancellationToken cancellationToken)
|
protected virtual Task AfterMetadataRefresh(TItemType item, MetadataRefreshOptions refreshOptions, CancellationToken cancellationToken)
|
||||||
|
Loading…
Reference in New Issue
Block a user