feat: Add local music library browsing and playback#2890
feat: Add local music library browsing and playback#2890alltechdev wants to merge 11 commits intomainfrom
Conversation
Browse and play local audio files from device storage. - Scan MediaStore for local audio files - Navigate: Library → Local box → Artists → Albums → Songs - Support all audio formats via DefaultExtractorsFactory - TopAppBar with back navigation - Scroll-to-top support - Pull-to-refresh to resync - Search and sort options Not ready, just saving progress, feel free to check it out though
TopAppBar with back button handles navigation, filter chip was redundant.
- Show local file info in details dialog instead of fetching from YouTube - Hide download option for local songs (already on device) - Hide start radio option for local songs (requires YouTube) - Hide share option for local songs in queue menu - Use storage icon for Local box in library
Local songs are always in the library since they exist on the device. The option doesn't make functional sense as they would reappear after the next MediaStore sync anyway.
Hide the song count text in LocalArtistScreen header until data loads from database, avoiding the "0 songs" flash during initial load.
- Add combinedClickable with onLongClick for albums in LocalArtistScreen - Update AlbumMenu to handle local albums properly: - Hide share option (no YouTube URL for local albums) - Hide download option (already on device) - Hide refetch option (no YouTube data to refresh) - Navigate to local_artist route for local album artists Playlists already support mixing local and online songs since they just store song IDs in the database.
Display a small CircularProgressIndicator while songs are loading instead of showing nothing or "0 songs".
Add FocusRequester to automatically focus the search text field and show keyboard when search is toggled on in LocalMusicScreen.
- Filter out local files from queue when creating/joining rooms - Block local playback in MusicService, screens, and menus - Hide Listen Together option when playing local files - Fix local file playback when seeking (use downloadUri regardless of position) - Dismiss mini player when timeline is cleared
|
Awesome to see this added |
Can you explain a bit more please? |
Look at the images below, this is what I mean |
|
Try latest when it's done building. |
The scanning can be a bit hit or miss sometimes like songs not showing up in some folders |



Problem
Users cannot browse or play local audio files (mp3, m4a, flac, ogg, etc.) stored on their device. The app only supports streaming from YouTube Music.
Cause
The app lacked integration with Android's MediaStore to scan and index local audio files, and had no UI for browsing local music.
Solution
SongEntity.isLocalanddownloadUrifields for playbackTesting
Important: Back up your database before testing. This build adds local music entries to the database. Reverting to the official release after testing would require clearing app data.