feat: add new playback experience and media integration

This commit is contained in:
zarzet
2026-06-28 22:22:33 +07:00
parent bede5ae8d7
commit 3a2481e8b2
15 changed files with 2636 additions and 7 deletions
+5
View File
@@ -94,6 +94,8 @@ class AppSettings {
deduplicateDownloads;
final bool saveDownloadHistory;
final String playerMode;
const AppSettings({
this.defaultService = '',
this.audioQuality = 'LOSSLESS',
@@ -155,6 +157,7 @@ class AppSettings {
this.lastSeenVersion = '',
this.deduplicateDownloads = true,
this.saveDownloadHistory = true,
this.playerMode = 'external',
});
AppSettings copyWith({
@@ -221,6 +224,7 @@ class AppSettings {
String? lastSeenVersion,
bool? deduplicateDownloads,
bool? saveDownloadHistory,
String? playerMode,
}) {
return AppSettings(
defaultService: defaultService ?? this.defaultService,
@@ -305,6 +309,7 @@ class AppSettings {
lastSeenVersion: lastSeenVersion ?? this.lastSeenVersion,
deduplicateDownloads: deduplicateDownloads ?? this.deduplicateDownloads,
saveDownloadHistory: saveDownloadHistory ?? this.saveDownloadHistory,
playerMode: playerMode ?? this.playerMode,
);
}
+2
View File
@@ -83,6 +83,7 @@ AppSettings _$AppSettingsFromJson(Map<String, dynamic> json) => AppSettings(
lastSeenVersion: json['lastSeenVersion'] as String? ?? '',
deduplicateDownloads: json['deduplicateDownloads'] as bool? ?? true,
saveDownloadHistory: json['saveDownloadHistory'] as bool? ?? true,
playerMode: json['playerMode'] as String? ?? 'external',
);
Map<String, dynamic> _$AppSettingsToJson(
@@ -149,4 +150,5 @@ Map<String, dynamic> _$AppSettingsToJson(
'lastSeenVersion': instance.lastSeenVersion,
'deduplicateDownloads': instance.deduplicateDownloads,
'saveDownloadHistory': instance.saveDownloadHistory,
'playerMode': instance.playerMode,
};