Jump to content

Add folders via API (intent)

Recommended Posts

The rescan I can handle. I've also managed "fullRescan" via intent
Action: com.maxmpz.audioplayer.ACTION_SCAN_DIRS
Extra: fullScan:true
Target: Service
- -
which is the crux of my issue.


I have a playlist (podcasts) that is generated via my home server nightly. It and the coinciding mp3s are pushed via adb to my phone to be played in the morning when I connect my earbuds (and a few additional irrelevant tasks complete). The issue is ever since I updated to A11 l am required to run a full rescan at night when that day's list is removed, and another after the new one is pushed, else it does not correctly resolve the playlist and its files (been fighting with it for weeks and just finally got it working again with the rescans, I believe it is due to the way the API calls playlists from the DB ('_id')).

Being on a pixel 3xl I have limited, non-extendable, storage, so I use an OTG adapter for my music (there's a lot.) When the rescans are done the otg is not connected, therefore the music is deleted from the DB and I have to manually re-add the folders then run the scan once I connect the USB. I am hoping to be able to automate this as much as possible 😃


With more testing, I've concluded I don't need to actually add new folders, just refresh the list. In the UI this would be  equivalent to going to "Library Settings" and clicking "Music Folders", wait a moment for refresh, cancel then rescan (a quick/simple scan is sufficient).

Still working it. May have to go the "Tasker + AutoInput" route. 😕

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...