fix: include genre, label, copyright in DownloadResponse

Extended metadata was being embedded into FLAC files but not returned
in the response to Flutter, causing history to not store these fields.

Fixed in 3 places in extension_providers.go:
- Source extension download response
- Extension fallback download response
- Built-in provider (Tidal/Qobuz/Amazon) response
This commit is contained in:
zarzet
2026-01-20 03:59:55 +07:00
parent d99a1b1c21
commit bb1ff187a3
+9
View File
@@ -848,6 +848,9 @@ func DownloadWithExtensionFallback(req DownloadRequest) (*DownloadResponse, erro
ActualBitDepth: result.BitDepth,
ActualSampleRate: result.SampleRate,
Service: req.Source,
Genre: req.Genre,
Label: req.Label,
Copyright: req.Copyright,
}
// Embed genre and label if provided (from Deezer metadata)
@@ -1010,6 +1013,9 @@ func DownloadWithExtensionFallback(req DownloadRequest) (*DownloadResponse, erro
ActualBitDepth: result.BitDepth,
ActualSampleRate: result.SampleRate,
Service: providerID,
Genre: req.Genre,
Label: req.Label,
Copyright: req.Copyright,
}
// Embed genre and label if provided (from Deezer metadata)
@@ -1169,6 +1175,9 @@ func tryBuiltInProvider(providerID string, req DownloadRequest) (*DownloadRespon
TrackNumber: result.TrackNumber,
DiscNumber: result.DiscNumber,
ISRC: result.ISRC,
Genre: req.Genre,
Label: req.Label,
Copyright: req.Copyright,
}, nil
}