feat: add external LRC lyrics file support and fix locale parsing

- Add lyrics mode setting (embed/external/both) for saving lyrics
- Implement SaveLRCFile() in Go backend for all providers (Tidal, Qobuz, Amazon)
- Fix locale parsing in app.dart to handle country codes (e.g., pt_PT -> Locale('pt', 'PT'))
- Change Portuguese label from Portugal to Brasil in language settings
This commit is contained in:
zarzet committed 2026-01-19 18:57:27 +07:00
1 parent 61720f3f2a
commit 1546d7da22
28 files changed
+680 -24

No files matched your search

+4
View File
@@ -32,6 +32,7 @@ class AppSettings {
final bool showExtensionStore; // Show Extension Store tab in navigation
final String locale; // App language: 'system', 'en', 'id', etc.
final bool enableMp3Option; // Enable MP3 quality option (default off, requires FFmpeg conversion)
final String lyricsMode; // embed, external, both - how to save lyrics
const AppSettings({
this.defaultService = 'tidal',
@@ -62,6 +63,7 @@ class AppSettings {
this.showExtensionStore = true, // Default: show store
this.locale = 'system', // Default: follow system language
this.enableMp3Option = false, // Default: disabled
this.lyricsMode = 'embed', // Default: embed lyrics into file
});
AppSettings copyWith({
@@ -94,6 +96,7 @@ class AppSettings {
bool? showExtensionStore,
String? locale,
bool? enableMp3Option,
String? lyricsMode,
}) {
return AppSettings(
defaultService: defaultService ?? this.defaultService,
@@ -124,6 +127,7 @@ class AppSettings {
showExtensionStore: showExtensionStore ?? this.showExtensionStore,
locale: locale ?? this.locale,
enableMp3Option: enableMp3Option ?? this.enableMp3Option,
lyricsMode: lyricsMode ?? this.lyricsMode,
);
}
+2
View File
@@ -37,6 +37,7 @@ AppSettings _$AppSettingsFromJson(Map<String, dynamic> json) => AppSettings(
showExtensionStore: json['showExtensionStore'] as bool? ?? true,
locale: json['locale'] as String? ?? 'system',
enableMp3Option: json['enableMp3Option'] as bool? ?? false,
lyricsMode: json['lyricsMode'] as String? ?? 'embed',
);
Map<String, dynamic> _$AppSettingsToJson(AppSettings instance) =>
@@ -69,4 +70,5 @@ Map<String, dynamic> _$AppSettingsToJson(AppSettings instance) =>
'showExtensionStore': instance.showExtensionStore,
'locale': instance.locale,
'enableMp3Option': instance.enableMp3Option,
'lyricsMode': instance.lyricsMode,
};