Jump to content

Changing Playlist Content

Recommended Posts


I'm trying to add new songs to a playlist through the API but I'm having a few problems.

Uri uri = PowerAMPiAPI.ROOT_URI.buildUpon().appendEncodedPath("playlists").appendEncodedPath(playlistId)


ContentValues values = new ContentValues();

values.put("_id", audioId);

return activity.getContentResolver().insert(uri, values);

I also tried this but with no lucky:

Uri uri = PowerAMPiAPI.ROOT_URI.buildUpon().appendEncodedPath("playlists").appendEncodedPath(playlistId).build();

As there is nothing on api demos related to playlists, I'm not sure I'm doing the right thing.

My question is if it is possible to change playlist content through ContentProviders and if so, how do I do it?



Share this post

Link to post
Share on other sites

Generally yes, it's possible - Poweramp's content provider is exposed to 3rd party apps. You'll need to learn Poweramp database schema though to make inserts into

the appropriate table. Note also, that Poweramp 2.1 will have modified schema in regard of playlists, so you may defer the actual release until Poweramp 2.1 (~1.5 months).

You can get Poweramp db via: adb pull /data/data/com.maxmpz.audioplayer/databases/folders.db

Then you can do sqlite3 folders.db on local machine and check the schema (folder_playlists, folder_playlists_entries).

Poweramp playlists content provider uris:

content://com.maxmpz.audioplayer.data/playlists - all playlists

content://com.maxmpz.audioplayer.data/playlists/ID - playlist by ID

content://com.maxmpz.audioplayer.data/playlists/ID/files - tracks in playlist ID

Currently, playlists is just a keys to folders_files table, which is a collection of actual tracks info.

Thus to insert track into Poweramp list you need:

1. have it under Poweramp available folders (there should be entries for the track in folder_files table)

2. insert appropriate folder_files._id into playlists table.

From Poweramp v2.1, playlists will be an isolated de-normalized table, which will contain track

data - i.e. path, track title/artist/album/duration. This is needed to keep Poweramp 2.1 playlists independent from Poweramp Folders selection and Poweramp library.

This also allows easier 3rd party playlist creation - as you need just insert appropriate data into 2 tables, without need to keep all Poweramp songs data properly.


Share this post

Link to post
Share on other sites

I guess my question is related to this one.

I have the android track detail but need to find the Poweramp equivalent in the folder_files table using the Poweramp provider exposed.


the full question is posted on this forum so follow this link


Share this post

Link to post
Share on other sites


thank you for responding to my question. I now have a better understanding.  I just realised that this is where I started.   :)

Did you manage to insert into the table folder_playlists and folder_playlist_entries?

I am following a similar approach but so far without any luck.

Would you like to share your solution? perhaps on stackoverflow???



Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...