Jump to content
Poweramp
Pauser

Importing playlists from system library

Recommended Posts

The android database has a playlist map table in extetnal.db. it contains a playlist id and audio id for each track in the playlists. Please tell me which table in the android database holds the full track name. I too have investigated the contents of both android and powerpoint databases.

Share this post


Link to post
Share on other sites

in sql database table name is audio_meta

but to access in code:

I have highlighted the one 

private final String track_id = MediaStore.Audio.Media._ID;
private final String track_no = MediaStore.Audio.Media.TRACK;
private final String track_name = MediaStore.Audio.Media.TITLE;
private final String artist = MediaStore.Audio.Media.ARTIST;
private final String artist_id = MediaStore.Audio.Media.ARTIST_ID;
private final String duration = MediaStore.Audio.Media.DURATION;
private final String album = MediaStore.Audio.Media.ALBUM;
private final String composer = MediaStore.Audio.Media.COMPOSER;
private final String year = MediaStore.Audio.Media.YEAR;
private final String path = MediaStore.Audio.Media.DATA;
private final String date_added = MediaStore.Audio.Media.DATE_ADDED;
private final Uri uri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;

 

screenshot.thumb.PNG.0d674ff2f25573b44490b4f8a693d3fe.PNG

Share this post


Link to post
Share on other sites

Wow, your android tables look completely different than mine. Where is that table stored? I'm looking at the external.db in /data/data/com.android.providers.media/databases. My database has sn android_metadata table that only contains a lang&country entry.

Share this post


Link to post
Share on other sites

Please feel free to continue discussing here, the info might be relevant to other users at some point anyway.

Andre

Share this post


Link to post
Share on other sites

I found an sqlite editor that lets me see all objects in the database including views, triggers, etc. From what I can see the audio_meta view contents look ok. This app lets me write table and view contents to a .csv file but when I tried it failed due to a permission error. Wonder if this is a clue to my problem.

Share this post


Link to post
Share on other sites

I'm seeing the following errors in the java runtime related to powerpoint:

03-01 17:31:33.301 E/dalvikvm(10424): Could not find class 'android.media.AudioAttributes$Builder', referenced from method com.maxmpz.audioplayer.player.PlayerService.onDestroy

03-01 17:31:33.401 E/dalvikvm(10424): Could not find class 'android.media.MediaMetadata$Builder', referenced from method kf.ll1l

Any ideas?

Share this post


Link to post
Share on other sites

To answer your earlier post, Given the  null error when Poweramp executes a query I do not think this is permission related. Second post, you will often find error logs like this but they are non fatal and have no direct impact. 

Why dont you try my app and see how your android playlists are displayed there?

Share this post


Link to post
Share on other sites

As this will be a one-off task to bring your existing playlists into PA, if Theo's app can read and save your system playlists then I'd just do that and once you've got them into PA it becomes a non-issue for you.

Andre

Share this post


Link to post
Share on other sites

Be aware that at the moment the Poweramp api does NOT allow inserting into a Poweramp playlist. My app can create the(empty) playlist, reorder any pa playlist, delete tracks from any pa playlist and delete the pa playlist itself but INSERT is not yet available. Max has promised this in the next release.

Share this post


Link to post
Share on other sites

Forum members,if you are interested, adb ( android debug bridge) can be installed on your pc as a standalone program. Once installed, plug in your device via usb, usb debugging enabled, and you will see the stacktrace of everything on your device. In addition, you can actually move around on the device as su using the windows cmd adb shell which takes you onto the device. From here you can use familiar unix commands duch as ls -al etc

Share this post


Link to post
Share on other sites
1 hour ago, flyingdutchman said:

Be aware that at the moment the Poweramp api does NOT allow inserting into a Poweramp playlist.

However there is a workaround. If you create an .M3U playlist file from the system list, and store that somewhere where Poweramp can scan it, that will work fine.

The only downside is that you can't then edit that playlist within the PA app (well you can, but any future rescan may revert it back to the file-based copy again). To convert the M3U file to a wholly internal playlist in Poweramp, long-press on the playlist title (once it has first been scanned into PA obviously) and select 'Add to Playlist' which will duplicate the entire file playlist as a local internal PA list. You can then remove the physical file (or maybe keep it somewhere as a backup).

Andre

Share this post


Link to post
Share on other sites

Andre, holy cow! You have just solved my problem. Thanks to you and Theo for all your help. I've learned much.

Share this post


Link to post
Share on other sites

Glad we could both help between us.

Do remember that once any 'hard' file-based playlists have been converted to internal (database) playlists, they are at risk of being lost - for example in a system crash or a reinstall. One issues that catches a lot of people out is if the SD Card file system becomes unmounted for any reason, PA will not be able to see any of your music files and thus it will assume they have all been deleted and remove them from the Library. This will also remove the entries from any Playlists, and while the Library will rebuild when the SD Card re-mounts, the Playlist entries will be irretrievable So if you make a lot of changes to your playlists, back them up to files periodically.

Andre

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×