mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-07-20 11:01:05 +02:00
fix: stricter metadata matching, respect embedLyrics setting, improve Apple Music lyrics
- Re-enrich: reject candidates that don't match title/artist/album unless exact ISRC match - Respect settings.embedLyrics instead of hardcoding true in re-enrich flows - Skip lyrics resolution in NativeDownloadFinalizer when not needed - Apple Music lyrics: use direct catalog API with token scraping instead of Paxsenix search - Support ELRC/ELRCMultiPerson/Plain formats in Apple Music lyrics response - Add confidence check in metadata auto-fill to prevent applying wrong metadata - Add tests for stricter re-enrich matching logic
This commit is contained in:
@@ -1081,10 +1081,11 @@ object NativeDownloadFinalizer {
|
||||
val genre = resultString(input, "genre").ifBlank { requestString(input, "genre") }
|
||||
val label = resultString(input, "label").ifBlank { requestString(input, "label") }
|
||||
val copyright = resultString(input, "copyright").ifBlank { requestString(input, "copyright") }
|
||||
val lyrics = resolveLyricsLrc(input)
|
||||
val shouldEmbedLyrics = input.request.optBoolean("embed_lyrics", false) &&
|
||||
(input.request.optString("lyrics_mode", "embed") == "embed" ||
|
||||
input.request.optString("lyrics_mode", "embed") == "both") &&
|
||||
val lyricsMode = input.request.optString("lyrics_mode", "embed")
|
||||
val shouldResolveLyrics = input.request.optBoolean("embed_lyrics", false) &&
|
||||
(lyricsMode == "embed" || lyricsMode == "both")
|
||||
val lyrics = if (shouldResolveLyrics) resolveLyricsLrc(input) else ""
|
||||
val shouldEmbedLyrics = shouldResolveLyrics &&
|
||||
lyrics.isNotBlank() &&
|
||||
lyrics != "[instrumental:true]"
|
||||
if (format == "flac") {
|
||||
|
||||
Reference in New Issue
Block a user