mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-07-06 04:37:59 +02:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user