Implement a modernized, modular backup and restore system (v3) using …#1039
Merged
theovilardo merged 1 commit intomasterfrom Feb 12, 2026
Merged
Implement a modernized, modular backup and restore system (v3) using …#1039theovilardo merged 1 commit intomasterfrom
theovilardo merged 1 commit intomasterfrom
Conversation
…a new `.pxpl` file format (ZIP-based) and robust validation pipelines.
- **New Backup System (v3)**:
- Replaces the legacy GZIP format with a ZIP-based structure containing a `manifest.json` and individual module JSON files.
- Introduces `BackupManager`, `BackupWriter`, and `BackupReader` to handle the new format while maintaining backward compatibility for v1/v2 backups via `LegacyPayloadAdapter`.
- Adds `BackupSection` to define exportable modules, including new support for **Artist Images**, **Equalizer Presets**, and **QuickFill Genres**.
- **Validation & Security**:
- Implements a multi-stage `ValidationPipeline` including file-level checks (size, extension), ZIP safety (path traversal, zip bomb protection), manifest integrity, and SHA-256 checksum verification for module payloads.
- Adds `ModuleSchemaValidator` and `ContentSanitizer` to ensure imported data meets structural and security requirements.
- **Restore Improvements**:
- Adds a "transactional" restore process in `RestoreExecutor` with snapshot-based rollback capabilities to prevent data corruption on partial failures.
- Introduces a "Restore Plan" phase that allows users to inspect backup metadata (device info, app version, module sizes) and select specific modules before importing.
- **UI & UX**:
- Completely overhauled the Import UI in `SettingsCategoryScreen` with a multi-step flow: file selection, backup inspection, and module-specific configuration.
- Implements a **Backup History** system in `BackupHistoryRepository` to track and quickly re-import recent backup files.
- Enhanced progress reporting for both export and import operations with detailed step descriptions.
- **Data & Persistence**:
- Updates `UserPreferencesRepository` to improve type safety and fallback logic during preference restoration.
- Adds specialized `BackupModuleHandler` implementations for all data types (Playlists, Favorites, Lyrics, Stats, etc.) to encapsulate serialization logic.
- Deprecates the old `AppDataBackupManager`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…a new
.pxplfile format (ZIP-based) and robust validation pipelines.New Backup System (v3):
manifest.jsonand individual module JSON files.BackupManager,BackupWriter, andBackupReaderto handle the new format while maintaining backward compatibility for v1/v2 backups viaLegacyPayloadAdapter.BackupSectionto define exportable modules, including new support for Artist Images, Equalizer Presets, and QuickFill Genres.Validation & Security:
ValidationPipelineincluding file-level checks (size, extension), ZIP safety (path traversal, zip bomb protection), manifest integrity, and SHA-256 checksum verification for module payloads.ModuleSchemaValidatorandContentSanitizerto ensure imported data meets structural and security requirements.Restore Improvements:
RestoreExecutorwith snapshot-based rollback capabilities to prevent data corruption on partial failures.UI & UX:
SettingsCategoryScreenwith a multi-step flow: file selection, backup inspection, and module-specific configuration.BackupHistoryRepositoryto track and quickly re-import recent backup files.Data & Persistence:
UserPreferencesRepositoryto improve type safety and fallback logic during preference restoration.BackupModuleHandlerimplementations for all data types (Playlists, Favorites, Lyrics, Stats, etc.) to encapsulate serialization logic.AppDataBackupManager.