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.
This commit is contained in:
zarzet
2026-06-13 20:31:02 +07:00
parent 953ef37882
commit 63c68b4d4d
+4 -2
View File
@@ -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
}