feat: add external player mode for local library playback

This commit is contained in:
zarzet
2026-02-27 14:38:45 +07:00
parent b3771f3488
commit 96d11b1d7d
5 changed files with 173 additions and 0 deletions
+4
View File
@@ -12,6 +12,7 @@ class AppSettings {
final String downloadTreeUri; // SAF persistable tree URI
final bool autoFallback;
final bool autoSkipUnavailableTracks;
final String playerMode; // 'internal' or 'external'
final bool smartQueueEnabled; // Enable smart curated autoplay queue
final bool embedMetadata; // Master switch for metadata/cover/lyrics embedding
final bool embedLyrics;
@@ -92,6 +93,7 @@ class AppSettings {
this.downloadTreeUri = '',
this.autoFallback = true,
this.autoSkipUnavailableTracks = true,
this.playerMode = 'internal',
this.smartQueueEnabled = true,
this.embedMetadata = true,
this.embedLyrics = true,
@@ -160,6 +162,7 @@ class AppSettings {
String? downloadTreeUri,
bool? autoFallback,
bool? autoSkipUnavailableTracks,
String? playerMode,
bool? smartQueueEnabled,
bool? embedMetadata,
bool? embedLyrics,
@@ -222,6 +225,7 @@ class AppSettings {
autoFallback: autoFallback ?? this.autoFallback,
autoSkipUnavailableTracks:
autoSkipUnavailableTracks ?? this.autoSkipUnavailableTracks,
playerMode: playerMode ?? this.playerMode,
smartQueueEnabled: smartQueueEnabled ?? this.smartQueueEnabled,
embedMetadata: embedMetadata ?? this.embedMetadata,
embedLyrics: embedLyrics ?? this.embedLyrics,
+2
View File
@@ -15,6 +15,7 @@ AppSettings _$AppSettingsFromJson(Map<String, dynamic> json) => AppSettings(
downloadTreeUri: json['downloadTreeUri'] as String? ?? '',
autoFallback: json['autoFallback'] as bool? ?? true,
autoSkipUnavailableTracks: json['autoSkipUnavailableTracks'] as bool? ?? true,
playerMode: json['playerMode'] as String? ?? 'internal',
smartQueueEnabled: json['smartQueueEnabled'] as bool? ?? true,
embedMetadata: json['embedMetadata'] as bool? ?? true,
embedLyrics: json['embedLyrics'] as bool? ?? true,
@@ -93,6 +94,7 @@ Map<String, dynamic> _$AppSettingsToJson(
'downloadTreeUri': instance.downloadTreeUri,
'autoFallback': instance.autoFallback,
'autoSkipUnavailableTracks': instance.autoSkipUnavailableTracks,
'playerMode': instance.playerMode,
'smartQueueEnabled': instance.smartQueueEnabled,
'embedMetadata': instance.embedMetadata,
'embedLyrics': instance.embedLyrics,