feat: add lyrics source tracking, Paxsenix partner, and dedicated lyrics provider settings page

- Add getLyricsLRCWithSource to return lyrics with source metadata
- Display lyrics source in track metadata screen
- Improve LRC parsing to preserve background vocal tags
- Add dedicated LyricsProviderPriorityPage for provider configuration
- Add Paxsenix as lyrics proxy partner for Apple Music/QQ Music
- Handle inline timestamps and speaker prefixes in LRC display
This commit is contained in:
zarzet
2026-02-14 02:15:36 +07:00
parent 30973a8e78
commit f4934dcb28
12 changed files with 803 additions and 200 deletions

View File

@@ -1582,6 +1582,32 @@ class MainActivity: FlutterFragmentActivity() {
}
result.success(response)
}
"getLyricsLRCWithSource" -> {
val spotifyId = call.argument<String>("spotify_id") ?: ""
val trackName = call.argument<String>("track_name") ?: ""
val artistName = call.argument<String>("artist_name") ?: ""
val filePath = call.argument<String>("file_path") ?: ""
val durationMs = call.argument<Int>("duration_ms")?.toLong() ?: 0L
val response = withContext(Dispatchers.IO) {
if (filePath.startsWith("content://")) {
val tempPath = copyUriToTemp(Uri.parse(filePath))
if (tempPath == null) {
"""{"lyrics":"","source":"","sync_type":"","instrumental":false}"""
} else {
try {
Gobackend.getLyricsLRCWithSource(spotifyId, trackName, artistName, tempPath, durationMs)
} finally {
try {
File(tempPath).delete()
} catch (_: Exception) {}
}
}
} else {
Gobackend.getLyricsLRCWithSource(spotifyId, trackName, artistName, filePath, durationMs)
}
}
result.success(response)
}
"embedLyricsToFile" -> {
val filePath = call.argument<String>("file_path") ?: ""
val lyrics = call.argument<String>("lyrics") ?: ""