From 63c68b4d4d60a743af336b494f3967b46f22a882 Mon Sep 17 00:00:00 2001 From: zarzet Date: Sat, 13 Jun 2026 20:31:02 +0700 Subject: [PATCH] fix(download): honor selected provider when it equals the track source When the chosen download service matched the track's source extension it was skipped in both the source preflight and the fallback loop, so downloads silently fell back to another provider. It is now attempted in the loop, and an explicitly selected provider bypasses the fallback allow-list. --- go_backend/extension_providers.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/go_backend/extension_providers.go b/go_backend/extension_providers.go index e3b6de3d..38326e7b 100644 --- a/go_backend/extension_providers.go +++ b/go_backend/extension_providers.go @@ -2483,11 +2483,13 @@ func DownloadWithExtensionFallback(req DownloadRequest) (*DownloadResponse, erro if providerID == "" { continue } - if providerID == req.Source { + // Skip the origin extension only when it differs from the explicitly + // selected provider; otherwise it must still be attempted here. + if providerID == req.Source && req.Source != selectedProvider { continue } - if !isExtensionFallbackAllowed(providerID) { + if providerID != selectedProvider && !isExtensionFallbackAllowed(providerID) { GoLog("[DownloadWithExtensionFallback] Skipping extension provider %s (not enabled for fallback)\n", providerID) continue }