Skip to content

Fix added for filtering music with date_added from media store#263

Merged
theovilardo merged 1 commit intotheovilardo:masterfrom
goonerDroid:bugfix/filter-music-date-added
Oct 23, 2025
Merged

Fix added for filtering music with date_added from media store#263
theovilardo merged 1 commit intotheovilardo:masterfrom
goonerDroid:bugfix/filter-music-date-added

Conversation

@goonerDroid
Copy link
Copy Markdown
Contributor

Fixes #254

Root Cause
During each sync cycle, the worker was assigning System.currentTimeMillis() as the dateAdded value for every newly discovered track. Since all songs found in the same scan received the exact same timestamp, the Date Added sort in LibraryScreen couldn’t reflect the true order that MediaStore reported.

Fix
The worker now preserves MediaStore’s original DATE_ADDED value when inserting new tracks into the local database. It pulls this field directly from the cursor and converts it from seconds to milliseconds to align with the app’s expected format.

This ensures that each track keeps its correct timestamp from MediaStore, restoring accurate sorting by Date Added

@theovilardo theovilardo merged commit 611e403 into theovilardo:master Oct 23, 2025
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.

Date added bug

2 participants