Jump to content

Importing playlists from system library


Pauser

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.

Link to comment
Share on other sites

  • Replies 43
  • Created
  • Last Reply

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

Link to comment
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.

Link to comment
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.

Link to comment
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?

Link to comment
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?

Link to comment
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.

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...