Merge pull request #17146 from theguymadmax/fix-identify-search
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Format / format-check (push) Waiting to run
Tests / run-tests (macos-latest) (push) Waiting to run
Tests / run-tests (ubuntu-latest) (push) Waiting to run
Tests / run-tests (windows-latest) (push) Waiting to run
OpenAPI Publish / OpenAPI - Publish Artifact (push) Waiting to run
OpenAPI Publish / OpenAPI - Publish Unstable Spec (push) Blocked by required conditions
OpenAPI Publish / OpenAPI - Publish Stable Spec (push) Blocked by required conditions
Project Automation / Project board (push) Waiting to run
Merge Conflict Labeler / main (push) Waiting to run

Fix Identify returning wrong results
This commit is contained in:
Bond-009 2026-06-21 19:03:52 +02:00 committed by GitHub
commit 4e80648fd3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -831,8 +831,16 @@ namespace MediaBrowser.Providers.Manager
var isLocalLocked = temp.Item.IsLocked;
if (!isLocalLocked && (options.ReplaceAllMetadata || options.MetadataRefreshMode > MetadataRefreshMode.ValidationOnly))
{
var remoteResult = await ExecuteRemoteProviders(temp, logName, false, id, providers.OfType<IRemoteMetadataProvider<TItemType, TIdType>>(), cancellationToken)
.ConfigureAwait(false);
var remoteProviders = providers.OfType<IRemoteMetadataProvider<TItemType, TIdType>>();
// When identifying, run the provider the user picked first so the correct IDs are used.
if (!string.IsNullOrEmpty(options.SearchResult?.SearchProviderName))
{
remoteProviders = remoteProviders
.OrderBy(i => string.Equals(i.Name, options.SearchResult.SearchProviderName, StringComparison.OrdinalIgnoreCase) ? 0 : 1);
}
var remoteResult = await ExecuteRemoteProviders(temp, logName, false, id, remoteProviders, cancellationToken).ConfigureAwait(false);
refreshResult.UpdateType |= remoteResult.UpdateType;
refreshResult.ErrorMessage = remoteResult.ErrorMessage;