mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-07-06 04:37:59 +02:00
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:
@@ -276,6 +276,23 @@ class PlatformBridge {
|
||||
return result as String;
|
||||
}
|
||||
|
||||
static Future<Map<String, dynamic>> getLyricsLRCWithSource(
|
||||
String spotifyId,
|
||||
String trackName,
|
||||
String artistName, {
|
||||
String? filePath,
|
||||
int durationMs = 0,
|
||||
}) async {
|
||||
final result = await _channel.invokeMethod('getLyricsLRCWithSource', {
|
||||
'spotify_id': spotifyId,
|
||||
'track_name': trackName,
|
||||
'artist_name': artistName,
|
||||
'file_path': filePath ?? '',
|
||||
'duration_ms': durationMs,
|
||||
});
|
||||
return jsonDecode(result as String) as Map<String, dynamic>;
|
||||
}
|
||||
|
||||
static Future<Map<String, dynamic>> embedLyricsToFile(
|
||||
String filePath,
|
||||
String lyrics,
|
||||
@@ -350,14 +367,17 @@ class PlatformBridge {
|
||||
}
|
||||
|
||||
/// Returns metadata about all available lyrics providers.
|
||||
static Future<List<Map<String, dynamic>>> getAvailableLyricsProviders() async {
|
||||
static Future<List<Map<String, dynamic>>>
|
||||
getAvailableLyricsProviders() async {
|
||||
final result = await _channel.invokeMethod('getAvailableLyricsProviders');
|
||||
final List<dynamic> decoded = jsonDecode(result as String) as List<dynamic>;
|
||||
return decoded.cast<Map<String, dynamic>>();
|
||||
}
|
||||
|
||||
/// Sets advanced lyrics fetch options used by provider-specific integrations.
|
||||
static Future<void> setLyricsFetchOptions(Map<String, dynamic> options) async {
|
||||
static Future<void> setLyricsFetchOptions(
|
||||
Map<String, dynamic> options,
|
||||
) async {
|
||||
final optionsJSON = jsonEncode(options);
|
||||
await _channel.invokeMethod('setLyricsFetchOptions', {
|
||||
'options_json': optionsJSON,
|
||||
|
||||
Reference in New Issue
Block a user