Fix Identify returning wrong images

This commit is contained in:
theguymadmax
2026-06-21 18:22:00 -04:00
parent 4e80648fd3
commit c49f279a27

View File

@@ -680,11 +680,18 @@ namespace MediaBrowser.Providers.Manager
return providers;
}
protected virtual IEnumerable<IImageProvider> GetNonLocalImageProviders(BaseItem item, IEnumerable<IImageProvider> allImageProviders, ImageRefreshOptions options)
protected virtual IEnumerable<IImageProvider> GetNonLocalImageProviders(BaseItem item, IEnumerable<IImageProvider> allImageProviders, MetadataRefreshOptions options)
{
// Get providers to refresh
var providers = allImageProviders.Where(i => i is not ILocalImageProvider);
// When identifying, run the provider the user picked first so the correct image is used.
if (!string.IsNullOrEmpty(options.SearchResult?.SearchProviderName))
{
providers = providers
.OrderBy(i => string.Equals(i.Name, options.SearchResult.SearchProviderName, StringComparison.OrdinalIgnoreCase) ? 0 : 1);
}
var dateLastImageRefresh = item.DateLastRefreshed;
// Run all if either of these flags are true