A cross platform Audiobookshelf client for Android and iOS
Dart
Keep books hidden from this year's finished list through a backup and restore
Barnabas89dc54269da7
diff --git a/lib/services/backup_service.dart b/lib/services/backup_service.dartindex 04298f29..3083becd 100644--- a/lib/services/backup_service.dart+++ b/lib/services/backup_service.dart@@ -209,6 +209,8 @@ class BackupService {final absorbingFinishedManualAdds =await ScopedPrefs.getStringList('absorbing_finished_manual_adds');final absorbingManualRemoves = await ScopedPrefs.getStringList('absorbing_manual_removes');+ // Books hidden from the local "finished this year" count and list+ final yearHiddenIds = await ScopedPrefs.getStringList('year_hidden_ids');// Pending offline state (scoped) - server hasn't received these yetfinal pendingSyncs = await ScopedPrefs.getStringList('pending_syncs');@@ -359,6 +361,7 @@ class BackupService {'absorbingManualAdds': absorbingManualAdds,'absorbingFinishedManualAdds': absorbingFinishedManualAdds,'absorbingManualRemoves': absorbingManualRemoves,+ 'yearHiddenIds': yearHiddenIds,'pendingSyncs': pendingSyncs,'pendingOfflineListening': pendingOfflineListening,'bookmarksPendingCreates': bookmarksPendingCreates,@@ -715,6 +718,10 @@ class BackupService {if (absorbingManualRemoves != null) {await ScopedPrefs.setStringList('absorbing_manual_removes', absorbingManualRemoves.cast<String>());}+ final yearHiddenIds = data['yearHiddenIds'] as List<dynamic>?;+ if (yearHiddenIds != null) {+ await ScopedPrefs.setStringList('year_hidden_ids', yearHiddenIds.cast<String>());+ }// Pending offline state (scoped) - so offline changes still push after restorefinal pendingSyncs = data['pendingSyncs'] as List<dynamic>?;