Defer image pre-fetching until the end of a refresh/scan

This commit is contained in:
cvium
2020-10-03 13:36:53 +02:00
parent 6cafc152b9
commit 763862cbd8
6 changed files with 158 additions and 23 deletions

View File

@@ -1433,7 +1433,6 @@ namespace MediaBrowser.Controller.Entities
new List<FileSystemMetadata>();
var ownedItemsChanged = await RefreshedOwnedItems(options, files, cancellationToken).ConfigureAwait(false);
await LibraryManager.UpdateImagesAsync(this).ConfigureAwait(false); // ensure all image properties in DB are fresh
if (ownedItemsChanged)
{

View File

@@ -352,11 +352,6 @@ namespace MediaBrowser.Controller.Entities
{
await currentChild.UpdateToRepositoryAsync(ItemUpdateType.MetadataImport, cancellationToken).ConfigureAwait(false);
}
else
{
// metadata is up-to-date; make sure DB has correct images dimensions and hash
await LibraryManager.UpdateImagesAsync(currentChild).ConfigureAwait(false);
}
continue;
}

View File

@@ -567,5 +567,7 @@ namespace MediaBrowser.Controller.Library
void AddExternalSubtitleStreams(List<MediaStream> streams,
string videoPath,
string[] files);
void RunMetadataSavers(IReadOnlyList<BaseItem> items, ItemUpdateType updateReason);
}
}