A cross platform Audiobookshelf client for Android and iOS
Dart
Include rolling download settings in backup export/import
Nathan Poulson6950f2001870
diff --git a/lib/services/backup_service.dart b/lib/services/backup_service.dartindex cf5d5e76..8efe7d36 100644--- a/lib/services/backup_service.dart+++ b/lib/services/backup_service.dart@@ -39,6 +39,8 @@ class BackupService {'fullScreenPlayer': await PlayerSettings.getFullScreenPlayer(),'themeMode': await PlayerSettings.getThemeMode(),'cardButtonOrder': await PlayerSettings.getCardButtonOrder(),+ 'rollingDownloadCount': await PlayerSettings.getRollingDownloadCount(),+ 'rollingDownloadDeleteFinished': await PlayerSettings.getRollingDownloadDeleteFinished(),};// AutoRewind@@ -96,6 +98,9 @@ class BackupService {}}+ // Rolling download series (per-account, like bookmarks)+ final rollingDownloadSeries = await ScopedPrefs.getStringList('rolling_download_series');+// Accounts & custom headers (optional — contain auth data)List<Map<String, dynamic>>? accounts;Map<String, String>? customHeaders;@@ -123,6 +128,7 @@ class BackupService {'bookSpeeds': bookSpeeds,'offlineMode': offlineMode,'bookmarks': bookmarks,+ 'rollingDownloadSeries': rollingDownloadSeries,'accounts': accounts,'customHeaders': customHeaders,};@@ -161,6 +167,8 @@ class BackupService {(s['cardButtonOrder'] as List<dynamic>).cast<String>(),);}+ if (s['rollingDownloadCount'] != null) PlayerSettings.setRollingDownloadCount(s['rollingDownloadCount'] as int);+ if (s['rollingDownloadDeleteFinished'] != null) PlayerSettings.setRollingDownloadDeleteFinished(s['rollingDownloadDeleteFinished'] as bool);// AutoRewindfinal r = data['autoRewind'] as Map<String, dynamic>?;@@ -221,6 +229,15 @@ class BackupService {}}+ // Rolling download series (per-account)+ final rollingDownloadSeries = data['rollingDownloadSeries'] as List<dynamic>?;+ if (rollingDownloadSeries != null && rollingDownloadSeries.isNotEmpty) {+ await ScopedPrefs.setStringList(+ 'rolling_download_series',+ rollingDownloadSeries.cast<String>(),+ );+ }+// Accountsfinal accounts = data['accounts'] as List<dynamic>?;if (accounts != null) {