Skip to content

feat: enhance MediaStore delete requests and storage volume resolution#2140

Merged
theovilardo merged 1 commit into
masterfrom
fix/media-store-batch-delete
May 28, 2026
Merged

feat: enhance MediaStore delete requests and storage volume resolution#2140
theovilardo merged 1 commit into
masterfrom
fix/media-store-batch-delete

Conversation

@theovilardo

Copy link
Copy Markdown
Collaborator

Updates MediaStorePermissionHelper to improve the reliability of batch deletions and better handle multiple storage volumes on Android 10+.

  • Added getAudioMediaStoreUris to resolve song IDs across all available storage volumes, including external_primary and specific volume names.
  • Introduced DeleteRequest data class to track IntentSender along with successfully accepted and rejected URIs.
  • Refactored createDeleteRequest to implement a fallback mechanism that filters out invalid URIs causing platform-level failures, allowing partial batch deletes.
  • Updated PlayerViewModel to integrate with the new DeleteRequest logic and accurately track skipped items during deletion.
  • Enhanced findValidMediaStoreUri to check for candidates across all discovered volume URIs.
  • Added unit tests for external_primary URI patterns and malformed MediaStore path segments.

Updates `MediaStorePermissionHelper` to improve the reliability of batch deletions and better handle multiple storage volumes on Android 10+.

- Added `getAudioMediaStoreUris` to resolve song IDs across all available storage volumes, including `external_primary` and specific volume names.
- Introduced `DeleteRequest` data class to track `IntentSender` along with successfully accepted and rejected URIs.
- Refactored `createDeleteRequest` to implement a fallback mechanism that filters out invalid URIs causing platform-level failures, allowing partial batch deletes.
- Updated `PlayerViewModel` to integrate with the new `DeleteRequest` logic and accurately track skipped items during deletion.
- Enhanced `findValidMediaStoreUri` to check for candidates across all discovered volume URIs.
- Added unit tests for `external_primary` URI patterns and malformed MediaStore path segments.
@theovilardo theovilardo merged commit 5dd8238 into master May 28, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant