wickedlemon Posted April 15, 2019 Share Posted April 15, 2019 I'm attempting to use Poweramp my car audio player and am trying to simplify/automate as much as possible. I have several m3u playlists which are in my library folder. They scan and show up with Poweramp ok and work fine. I gather you need to reference playlist ids when using the API, which isn't ideal, so I've tried to ascertain these by trial and error. The problem is, sending the same id will start a different playlist on each occasion. So I have no idea what the numbers I'm sending through are actually referencing. content://com.maxmpz.audioplayer.data/playlists/[number] cmd:20 I'm replacing number by trial and error integers starting at 1. Can any one shine any light on what I may be doing wrong? Link to comment Share on other sites More sharing options...
flyingdutchman Posted April 15, 2019 Share Posted April 15, 2019 This has been problematic for other Poweramp users. That is why i provide the playlist id in my app New Playlist Manager. It is even there in the free version. !! Link to comment Share on other sites More sharing options...
wickedlemon Posted April 15, 2019 Author Share Posted April 15, 2019 I have tried your app, but I doesn't show my m3u playlists. The only playlists it seems to show are ones created with the app. I did try the import option under m3u playlists, which although it gave me an id, did so by doubling up the playlists in Poweramp. Should your app pick up and show ids for m3u playlists? If so how do I go about it? Link to comment Share on other sites More sharing options...
flyingdutchman Posted April 15, 2019 Share Posted April 15, 2019 I will add the id for m3u too Link to comment Share on other sites More sharing options...
wickedlemon Posted April 15, 2019 Author Share Posted April 15, 2019 Thanks that would be great. But at the moment your app doesn't show my m3u playlists. Is that correct behaviour? Link to comment Share on other sites More sharing options...
flyingdutchman Posted April 15, 2019 Share Posted April 15, 2019 The default folder is playlist_manager but you can change this Link to comment Share on other sites More sharing options...
wickedlemon Posted April 15, 2019 Author Share Posted April 15, 2019 Got ya! I assumed it would just pull the playlists from Poweramp as they were scanned into the library. I didn't think I'd need to change that path as I wasn't exporting. Link to comment Share on other sites More sharing options...
flyingdutchman Posted April 15, 2019 Share Posted April 15, 2019 It does pull the Poweramp playlists from the Poweramp database. This is what you see on the Poweramp tab. However when exporting as m3u, they become independent files which Poweramp then picks up again, assuming it scans the folders,and enters them into its database. I would need to investigate how this is managed in the database. Link to comment Share on other sites More sharing options...
wickedlemon Posted April 15, 2019 Author Share Posted April 15, 2019 My playlists are independently created m3u files which are in the music library folder that Poweramp scans. They show up under playlists in Poweramp but not under the Playlist tab in your app. Link to comment Share on other sites More sharing options...
flyingdutchman Posted April 16, 2019 Share Posted April 16, 2019 If they ddo not show in my app then you need to set the default m3u folder to the folder where you have your m3u playlists. From the menu, local folders, browse to the correct folder, then select Default folders, set m3u export folder. Your playlists will then show up. Link to comment Share on other sites More sharing options...
flyingdutchman Posted April 16, 2019 Share Posted April 16, 2019 If you want to play the physical .m3u files using tasker, then you do not need the Poweramp Id as these files are effectively independent and you should be able to launch Poweramp with the playlist name (imho). If you want to play playlists located in Poweramp, you have the id showing in my app. I exclude .m3u and smb playlists from displaying pamp.pampplaylistnameColumn + " NOT LIKE \'smb_%\' AND " + pamp.pampplaylistnameColumn + " NOT LIKE \'%.m3u%\'"; Link to comment Share on other sites More sharing options...
wickedlemon Posted April 16, 2019 Author Share Posted April 16, 2019 I've worked out the playlist ids I need for now. Thanks for all your help. Now to do lots of testing and see what other issues arise! Link to comment Share on other sites More sharing options...
wickedlemon Posted April 17, 2019 Author Share Posted April 17, 2019 Today my playlist IDs seem to have jumbled up. I wonder if IDs change if the m3u contents have changed? If so that's an issue. I've tried playing the m3u directly from Tasker but I get a "Music Playback: Playback failed". I guess I'm hoping the system would know what to do with the file and open it in my default player. Link to comment Share on other sites More sharing options...
flyingdutchman Posted April 17, 2019 Share Posted April 17, 2019 As i said previously, if you create an .m3u8 playlist and Poweramp scans it, it will recreate another Poweramp playlist (if fact a duplicate) so it will get a new unique id. I think trying to launch m3u playlists is pointless, you might as well just use the original playlist (for which I show the id). The exception is if you ensure Poweramp does NOT scan your .m3u playlists, simply as backups so these playlists would not reappear in Poweramp. Link to comment Share on other sites More sharing options...
wickedlemon Posted April 17, 2019 Author Share Posted April 17, 2019 What I'm trying to achieve is have a selection of playlists that are regularly updated from my PC and can then be launched via Bluetooth buttons without having to mess around manually updating/scanning/importing anything on my phone. So there's no way to reference these playlists using the API as their IDs will constantly be changing? I can keep them outside of the Poweramp library folders if that is the only way to proceed, but I'm a bit lost as to how to launch these from Tasker. Link to comment Share on other sites More sharing options...
flyingdutchman Posted April 17, 2019 Share Posted April 17, 2019 What I can do is to provide an option to show.m3u on the Poweramp playlist Tab. This would give you the ids. I do not think the ids are constantly changing but each time a new playlist is created, a new unique id is generated. If you delete one, the freed up Id may not be used as the number tends to be sequentially generated Link to comment Share on other sites More sharing options...
papete Posted February 9, 2020 Share Posted February 9, 2020 Posting here too as this is the most appropriate thread... OK, I figured out the way to get the Poweramp playlist IDs with Tasker. It only works with a rooted device: use the SQL query action. Mode: raw, file:/data/data/com.maxmpz.audioplayer/databases/folders.db Query: SELECT _id, playlist FROM playlists This action will return an array with the playlists names and id’s. Remember to check root on the action to work. Link to comment Share on other sites More sharing options...
maxmp Posted February 9, 2020 Share Posted February 9, 2020 @papete You don’t really need root or direct file access for this. See here for the details: https://github.com/maxmpz/powerampapi/blob/master/poweramp_api_lib/src/com/maxmpz/poweramp/player/PowerampAPI.java#L289 Link to comment Share on other sites More sharing options...
papete Posted February 9, 2020 Share Posted February 9, 2020 52 minutes ago, maxmp said: @papete You don’t really need root or direct file access for this. See here for the details: https://github.com/maxmpz/powerampapi/blob/master/poweramp_api_lib/src/com/maxmpz/Poweramp/player/PowerampAPI.java#L289 Thanks max, actually after I found the direct SQL read method this method was mentioned in the reddit post I opened looking for help. Thanks a lot for such a complete api!! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.