Jump to content
Poweramp
water

Playlist m3u detection broken since 823 update

Recommended Posts

I'm using the non-playstore download version from here: https://forum.powerampapp.com/files/

Poweramp-v3-build-823-uni.apk

Since updating, Poweramp finds the m3u playlist file and makes a playlist but it puts very few songs in the new playlist and the playlist is errantly composed of the wrong songs that were already in other playlists.

I'm on Android 6.0.1 and it was working great before the update.

My m3u files used to work OK, but I also tried m3u8 and I get same results.

Share this post


Link to post
Share on other sites

Have you tried a Full Rescan in case there is anything wrong with the library database? Also, do the contents of the M3U files exactly match the song file details? And if there are any non-alphanumeric characters then you need to use the .M3U8 file extender, but you say you've already tried that.

PA now only uses the filename and one level of folder naming to match songs by the way - to prevent issues when people move playlist files from one filesystem to another - so make sure none of those could be ambiguous with other songs (it would have to be a very contrived situation for that to be the problem though).

Andre

Share this post


Link to post
Share on other sites

For file based playlists (m3u included) Poweramp tries to match songs which are in its Library. If m3u contains entries which point outside checked Music Folders, such entry is not visible at all.

Btw, due to the upcoming Android Q storage changes (scoped storage), playlist resolution was changed in 824+ a lot - now un-resolved entries won’t be hidden and will be visible (as filenames), though not playable if track is outside of checked Music Folders (partially due to the no-permission to access them on recent androids). 

Share this post


Link to post
Share on other sites
14 hours ago, andrewilley said:

Have you tried a Full Rescan in case there is anything wrong with the library database? Also, do the contents of the M3U files exactly match the song file details? And if there are any non-alphanumeric characters then you need to use the .M3U8 file extender, but you say you've already tried that.

PA now only uses the filename and one level of folder naming to match songs by the way - to prevent issues when people move playlist files from one filesystem to another - so make sure none of those could be ambiguous with other songs (it would have to be a very contrived situation for that to be the problem though).

Andre

Thank you both for replies!

How do I do a full rescan?  Do you mean something in Android or within Poweramp?  I've hit Rescan under the Playlists option in Poweramp, but it doesn't help.

rescan.png.a84b207cf42fd769bb2b7e406661157e.png

I think I'm figuring out what causes the issue.

When I export this 'Rage Against the Machine' iTunes playlist from here (not within an iTunes Playlist folder),

It works perfectly with Poweramp:

686450733_ScreenShot2019-04-15at4_01_02PM.png.1488a81302d536685124a300e0efb9eb.png

#EXTM3U
#EXTINF:244,Bombtrack - Rage Against The Machine
/Users/jimmy/Music/iTunes/iTunes Media/Music/Rage Against The Machine/Rage Against The Machine/01 Bombtrack.mp3
#EXTINF:314,Killing In The Name - Rage Against The Machine
/Users/jimmy/Music/iTunes/iTunes Media/Music/Rage Against The Machine/Rage Against The Machine/02 Killing In The Name.mp3
#EXTINF:337,Take The Power Back - Rage Against The Machine
/Users/jimmy/Music/iTunes/iTunes Media/Music/Rage Against The Machine/Rage Against The Machine/03 Take The Power Back.mp3
#EXTINF:288,Settle For Nothing - Rage Against The Machine
/Users/jimmy/Music/iTunes/iTunes Media/Music/Rage Against The Machine/Rage Against The Machine/04 Settle For Nothing.mp3
#EXTINF:309,Bullet In The Head - Rage Against The Machine
/Users/jimmy/Music/iTunes/iTunes Media/Music/Rage Against The Machine/Rage Against The Machine/05 Bullet In The Head.mp3
#EXTINF:295,Know Your Enemy - Rage Against The Machine
/Users/jimmy/Music/iTunes/iTunes Media/Music/Rage Against The Machine/Rage Against The Machine/06 Know Your Enemy.mp3
#EXTINF:364,Wake Up - Rage Against The Machine
/Users/jimmy/Music/iTunes/iTunes Media/Music/Rage Against The Machine/Rage Against The Machine/07 Wake Up.mp3
#EXTINF:331,Fistful Of Steel - Rage Against The Machine
/Users/jimmy/Music/iTunes/iTunes Media/Music/Rage Against The Machine/Rage Against The Machine/08 Fistful Of Steel.mp3
#EXTINF:324,Township Rebellion - Rage Against The Machine
/Users/jimmy/Music/iTunes/iTunes Media/Music/Rage Against The Machine/Rage Against The Machine/09 Township Rebellion.mp3
#EXTINF:366,Freedom - Rage Against The Machine
/Users/jimmy/Music/iTunes/iTunes Media/Music/Rage Against The Machine/Rage Against The Machine/10 Freedom.mp3

Poweramp results:

985318784_ScreenShot2019-04-15at3_53_38PM.png.e2d0d55fab13df5eb5eb58dbdc87d069.png

15880705_ScreenShot2019-04-15at3_53_56PM.png.f84148cea24cfea482515c72005d81c4.png

Works perfect.

HOWEVER:

When I export this 'Porno For Pyros 93' iTunes Playlist from within an iTunes Playlist folder,  Poweramp creates the Playlist, but puts nothing in it.

1445235295_ScreenShot2019-04-15at3_36_17PM.png.af99661fdf2f346b14a7c0ae4ecf091a.png

#EXTM3U
#EXTINF:154,Sadness - Porno For Pyros
/Users/jimmy/Music/iTunes/iTunes Media/Music/Porno For Pyros/Porno For Pyros/01 Sadness.mp3
#EXTINF:187,Porno For Pyros - Porno For Pyros
/Users/jimmy/Music/iTunes/iTunes Media/Music/Porno For Pyros/Porno For Pyros/02 Porno For Pyros.mp3
#EXTINF:193,Meija - Porno For Pyros
/Users/jimmy/Music/iTunes/iTunes Media/Music/Porno For Pyros/Porno For Pyros/03 Meija.mp3
#EXTINF:205,Cursed Female - Porno For Pyros
/Users/jimmy/Music/iTunes/iTunes Media/Music/Porno For Pyros/Porno For Pyros/04 Cursed Female.mp3
#EXTINF:231,Cursed Male - Porno For Pyros
/Users/jimmy/Music/iTunes/iTunes Media/Music/Porno For Pyros/Porno For Pyros/05 Cursed Male.mp3
#EXTINF:217,Pets - Porno For Pyros
/Users/jimmy/Music/iTunes/iTunes Media/Music/Porno For Pyros/Porno For Pyros/06 Pets.mp3
#EXTINF:179,Bad Shit - Porno For Pyros
/Users/jimmy/Music/iTunes/iTunes Media/Music/Porno For Pyros/Porno For Pyros/07 Bad Shit.mp3
#EXTINF:250,Packin' .25 - Porno For Pyros
/Users/jimmy/Music/iTunes/iTunes Media/Music/Porno For Pyros/Porno For Pyros/08 Packin' .25.mp3
#EXTINF:274,Black Girlfriend - Porno For Pyros
/Users/jimmy/Music/iTunes/iTunes Media/Music/Porno For Pyros/Porno For Pyros/09 Black Girlfriend.mp3
#EXTINF:211,Blood Rag - Porno For Pyros
/Users/jimmy/Music/iTunes/iTunes Media/Music/Porno For Pyros/Porno For Pyros/10 Blood Rag.mp3
#EXTINF:269,Orgasm - Porno For Pyros
/Users/jimmy/Music/iTunes/iTunes Media/Music/Porno For Pyros/Porno For Pyros/11 Orgasm.mp3

Poweramp results:

1702168911_ScreenShot2019-04-15at3_55_20PM.png.1378df50160b09f740d92352eea62514.png

256533350_ScreenShot2019-04-15at3_55_56PM.png.c7f55e75b11b1ea4ca40eccd391649de.png

 

So the issue has something to do with Playlists that are exported from iTunes that are within iTunes Playlist Folders.

Any way to fix that?

A huge majority of my Playlists are organized in iTunes Playlist Folders and having to remove them all would be a nightmare for my discographies.

 

Share this post


Link to post
Share on other sites

Full Rescan is in Settings > Library, but I doubt that is your problem if some playlists work and some don't. Worth a try though

When you say that you "export" them from within iTunes within (or not within) an iTunes Playlist folder, what do you mean? Is iTunes creating the folders and/or playlist files?

Both sets of M3U content look fine to me to be honest, PA ignores most of the non-filename portions anyway, all it really should need are the folder/filename bits, e.g.:

Rage Against The Machine/01 Bombtrack.mp3
Rage Against The Machine/02 Killing In The Name.mp3

Does the folder structure on your mobile device match the path layout on your computer? Is the duplication of the artist name in both lists deliberate - perhaps the album titles match the artist names in these cases?

Andre

Share this post


Link to post
Share on other sites
Quote

When you say that you "export" them from within iTunes within (or not within) an iTunes Playlist folder, what do you mean? 

iTunes allows the user to keep playlists in playlist folders.

https://support.apple.com/guide/itunes/organize-playlists-in-folders-itns3140/mac

I utilize that for discographies for bands like so:

folders.jpg.aaf388e58a9929c81d4b38413eb3d3d7.jpg

When I export a playlist from within a folder it's like this:

10qFv80.png

Then the user has a playlist file for the playlist contained within that playlist folder.
 

Rage Against The Machine/01 Bombtrack.mp3
Rage Against The Machine/02 Killing In The Name.mp3

The example you're showing is the playlist that works correctly.  The playlist that doesn't work correctly is the 'Porno for Pyros' Playlist that's exported from within the Playlist Folder as shown above.  Both are in the Android 'Music' Folder like this:

iTLvTRo.png

But for some reason, the "Porno for Pyros 93' playlist file doesn't work at all with with Poweramp, but the 'Rage Against the Machine' playlist works perfectly.

The only difference is "Rage Against the Machine' was exported without it being contained within an iTunes Playlist folder.

/Users/jimmy/Music/iTunes/iTunes Media/Music/Porno For Pyros/Porno For Pyros/01 Sadness.mp3

Ok, I see the problem.  For some reason iTunes exported the playlist file with the number 93 on the end of the folder.

I changed the name of the folder from 'Porno for Pyros 93'  to ' 'Porno for Pyros' and it's fixed.

I'm going to test some other playlists and report back.

Share this post


Link to post
Share on other sites

Ok I think I figured out what's going on with some of the playlists with compilations of song from various bands.  The sync program I use to bring over songs from the playlists from iTunes to Android has changed the way it performs the task.  It used to create album folders for the songs like this:

zMsDFDq.png

Instead of that folder structure above, my sync program now just puts all the songs into ONE folder without the Album folders.

In doing so, the folder structure no longer matches up with the iTunes playlist structure.

I've found if I simplify the playlists to reflect this change Poweramp works fine. For example I just altered this exported playlist from this:

#EXTM3U
#EXTINF:314,Hey Man Nice Shot - Filter
/Users/jimmy/Music/iTunes/iTunes Media/Music/Filter/Short Bus/01 Hey Man Nice Shot.mp3
#EXTINF:173,Biscuits For Smut - Helmet
/Users/jimmy/Music/iTunes/iTunes Media/Music/Helmet/Betty/03 Biscuits For Smut.mp3
#EXTINF:267,Like Rats - Godflesh
/Users/jimmy/Music/iTunes/iTunes Media/Music/Godflesh/Streetcleaner/01 Like Rats.m4a

To this:

#EXTM3U
#EXTINF:314,Hey Man Nice Shot - Filter
01 Hey Man Nice Shot.mp3
#EXTINF:173,Biscuits For Smut - Helmet
03 Biscuits For Smut.mp3
#EXTINF:267,Like Rats - Godflesh
01 Like Rats.m4a

In a folder on my Android phone that's structured like this:

800557307_ScreenShot2019-04-15at7_06_02PM.png.6738c28b88cfef45c8994634f7dc3181.png

And that works with Poweramp:

nCAmXj1.png

I think from now on I'm going to alter the iTunes playists to remove the folder structure for music compilations with varying artists.

Now I just need to find a good way to automatically do that.

 I'm going to see if some app can filter the text to remove the forward slashes and everything between them:

/Users/jimmy/Music/iTunes/iTunes Media/Music/Filter/Short Bus/01 Hey Man Nice Shot.mp3

Looks like I can use this regex to do it:

 \/[^\]]*\/\W*

I just need to have it work only line by line instead of deleting everything on all text lines.

This is the regex I have so far that I hope someone can help fix:

https://regex101.com/r/RhdWA5/13

I want the end result like this:

#EXTM3U
#EXTINF:314,Hey Man Nice Shot - Filter
01 Hey Man Nice Shot.mp3
#EXTINF:173,Biscuits For Smut - Helmet
03 Biscuits For Smut.mp3
#EXTINF:267,Like Rats - Godflesh
01 Like Rats.m4a

Instead of this:

#EXTM3U
#EXTINF:314,Hey Man Nice Shot - Filter
01 Like Rats.m4a

Ok, got the correct regex this works:

^\/[^\n]*\/

 

Share this post


Link to post
Share on other sites

Completely removing all path info from your M3U files could prove problematical later where your filenames just contain the track title rather than any other identifying data. This could cause problems with (for example, and thankfully rare) a case where you have a regular album and a live album where the first track by the band has the same title wording. Or where you have a song title that has been released by several different artists - either as  different songs (there are at least ten completely different songs entitled "Dreamer" for example) or just as cover versions. The fact the a track number is included in most of your filenames will reduce the possibility of ambiguity, but it's still there.

Any line that starts with # will be ignored by Poweramp by the way, so if you want to tidy the file up still further you could also delete ^[#].* (add whatever line terminator your files use,  \r  or  \r\n  to also remove the resulting blank lines)

In short, my own personal golden rule is not to let iTunes anywhere near any of my computers or devices, the darn thing has a mind of its own and I prefer to control my own setup of folders/filenames rather than letting Apple decide how to do it for me. :) 

Andre

Share this post


Link to post
Share on other sites

Thank you for the further advice and the extra regex, Andrew!  What's the data there after the # for I wonder if apps such as Poweramp don't read it?

Quote

This could cause problems with (for example, and thankfully rare) a case where you have a regular album and a live album where the first track by the band has the same title wording. Or where you have a song title that has been released by several different artists - either as  different songs (there are at least ten completely different songs entitled "Dreamer" for example) or just as cover versions. The fact the a track number is included in most of your filenames will reduce the possibility of ambiguity, but it's still there.

Doesn't the metadata within the song files stop those problems?  I noticed that Poweramp pick that data right up to grab the artist at least.

I used to hate iTunes as well and used alternatives.  However, over the years Apple added various features and tweaks that I really enjoy.  I also learned to tame it by setting up my own methods of organizing things within it and I'm overall happy with it.  I sure do understand why it has a bad rep though.  A lot of the bloaty UI stuff can be removed from it by changing settings here and there.  I also utilize applescripts to bend iTunes to my will. The playlist issue was from a separate non-Apple app changing things unexpectedly, but it would be nice if Apple allowed more control over how it exports playlists in the first place that's for sure.

 

Share this post


Link to post
Share on other sites

Poweramp first tries to match the path as given in playlist, but this usually fails (as it's unlikely your songs folders hierarchy matches absolutely the source PC hierarchy), so it then tries to "resolve" playlist entries by just last folder and filename.

Poweramp resolves entries vs its database, meaning, the playlist songs should be in checked Music Folders (they should be visible/searchable in Poweramp Library).

Share this post


Link to post
Share on other sites
9 hours ago, water said:

Thank you for the further advice and the extra regex, Andrew!  What's the data there after the # for I wonder if apps such as Poweramp don't read it?

Doesn't the metadata within the song files stop those problems?  I noticed that Poweramp pick that data right up to grab the artist at least.

The extra "#" data in M3U files is used by some apps to enable them to quickly know the running time, title, album, etc of every contained song without having to first scan the tags from every file. However as PA is completely Library-based, and every song that is shown in a playlist must already have been scanned into its local library, it does not use that info at all. It also does not write those lines back out if your Export playlists back to new files by the way.

Andre

Share this post


Link to post
Share on other sites

Playlist entries have disappeared since update 823 and remain so after a full rescan.

This makes me sick. So much work goes into making these lists. All for nothing. Only a portion is retrievable from the latest backup.

The additions to the playlists were made from within PA.

Is there a way to stop updates from destroying my files?

Share this post


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

Playlist entries have disappeared since update 823 and remain so after a full rescan.

This makes me sick. So much work goes into making these lists. All for nothing. Only a portion is retrievable from the latest backup.

Are you talking about editing internal playlists (i.e. ones in Poweramp's own local database only) or using Poweramp to edit the contents of existing file-based .M3U playlists?

If the latter, there is a reported bug going back several versions not just 823, which unfortunately Max has still not been able to reproduce on his test systems. This seems to occasionally cause an individual .M3U playlist file to get wiped - the file still exists, but it becomes zero byes long. It could be related to making edits to playlists, but I've had it happen to me on multiple occasions and I rarely if ever re-edit my file-based playlists.

The difficulty is that you only notice this problem some time after it has happened when you return to use an old playlist. I generally maintain and save my playlists on my PC though, and copy them to my phone, so if it ever happens to me I just copy the file back again. That is not an answer I know, but if you can provide anything further which might help Max track this down I'm sure a lot of people would be very happy.

Andre

Share this post


Link to post
Share on other sites

Indeed it has happened before after an update. Some playlists gone entirely, others wiped (almost) clean. This time no lists have gone but a series of entries in at least one particular list have. This is definitely recent since I often play from this list. I created the list within PA and added to it from within PA. All my lists are .M3U. In the course of the existence of this list I have copied it back and forth to my laptop. Either to make a backup or to restore it after another destruction by a PA update. Not sure if anything changes during this process, don't think it does. In any case, this time round the playlist is still there, only curtailed.

Maybe there is something in the following: I also USB Audio Player PRO (UAPP). The reason for this, by the way, is the fact that Poweramp had never implemented HiRes for my Pioneer XDP-100R, though I have asked for it 3 years ago. Anyway, this player also has an issue with playlists on my DAP. It does not show them the regular way. I have to go to the root, tap on a list and watch a conversion/parsing process into something that can be read by the software. I cannot add to a playlist. This parsing has to happen every time. I noticed that one playlist has 250 songs in it in UAPP but only 69 in PA. More playlists have this discrepancy.

Looking into it further I also noticed that UAPP does show songs from SD card 1 as well as SD card 2 while PA only displays songs from SD card 2 in the PA playlists with this difference in number of songs. Could that be something? Though it does not explain why one particular playlist has lost a series

I have done a full rescan after the update. The cards have not left my player for a while.

Share this post


Link to post
Share on other sites

Do all of the 'missing' songs appear in Poweramp's main library views - e.g. All Songs, Folders, Albums. If not, then the problem could be in scanning permissions (check Settings > Library > Music Folders). No song can be shown in a Playlist in PA if that song is not present (scanned) in the main library database first.

When you said you created M3U playlists within Poweramp, do you mean you first created them as internal playlists (which is the only way you can do it in PA) and then used the 'Export Poweramp Playlists' feature to create .M3U8 versions? What do the files actually look like if you open them in a text editor, do the paths and filenames match your device's file system correctly? Are there any unusual characters in any of the filenames or paths (international characters, etc)? If so, try renaming any .M3U files to .M3U8.

Andre

Share this post


Link to post
Share on other sites

Those songs are only missing from the playlists, they exist.

Some of the remaining songs are from SD card 1 as well as 2. So it is not always just the songs from one card missing.

Having just created a new playlist in PA I am beginning to doubt whether I have done that with the playlist called 'set' that has entries missing. I know I have made a number of playlists in JRiver and copied them to the DAP (after editing to create the right pointers). This was before I made my DAP my main music center. So I delete songs in PA and create/modify playlists in PA on the DAP. A few times a year I copy the whole lot to my laptop as a backup. The JRiver playlists worked for a long time without a problem. In the past months, probably after a PA update, I lost several lists enterely. Some came back after a full rescan. But I think I have had to restore several lists from my backup. I didn't keep track of what I did in order to make it work again, being happy the problem seemed solved.

When I backed up the playlists from my DAP I did so my copying the lists in Windows Explorer. That seemed to be working. Songs added from within PA showed up in the playlists when I checked after copying/backing up. So restoring followed the same route. Copy paste. Not via import/export.

Working on this issue, since you asked, I opened a playlist in Notepad. This list, as all others (except for the new 'test' list I just made) are sitting in the root of the internal storage. It shows about a 100 songs, but only 13 show up in PA. All the missing ones are on SD card 1. Though that is selected in music folders and I have done a full rescan. In the other case I mentioned it was less clear cut, because it still contained songs from SD card 1. In settings-music folders I first unchecked the internal storage where the playlists are located. The automatic scan followed, rendering all playlists absent (except the 'test' one I just created). And then I selected the internal storage again. After the ensuing scan it brought back the missing songs in the playlist mentioned above. But not the ones missing from 'set'. In this case are was also no difference between the list in Notepad and in PA.

As music folders I have, as always, selected the entire internal storage, the entire SD card 1 and the entire SD card 2.

One playlist shows yet another issue. Opening it in Notepad gives 19 songs. In PA however I count 23 songs! The difference are 4 songs at the bottom of the list in PA, all recent additions. But where are they stored? So there is a difference between what was imported/copied and what was added from within PA? But why do the recently added songs show up in one list and not in another ?

Yet another playlist shows the following: I recently added 14 songs to it, from within PA. I see them on my DAP screen. When I look at the playlist in Notepad however I see only 2 recently added songs. After that there is a partial reference only:

 

/storage/sdcard1/Hanne Hukkelberg/Rykestrasse 68/07 Break my Body.mp3

/storage/sdcard1/Hanne Hukkelberg/Rykestrasse 68/09 Pynt.mp3

/storage/sdcard2/Lonely-Drifter-Karen/Grass-Is-Singing/1_9_Lonely-Drifter-Karen_Carousel-Horses_6.flac

/storage/sdcard2/Lonely-Drifter-Karen/Grass-Is-Singing/1_6_Lonely-Drifter-Karen_Casablanca_6.flac

/storage


 

The only irregular symbols in the playlists are underscores in stead of a space.

In the internal storage I also have folders from Neutron and from UAPP. Could they interfere?

Only 5 gb used of the 25 available on the internal storage, so that can't be it.

The playlists I have are a mix of .M3U and .M3U8. Though the content seems the same to me.

Could the fact that I have 2 SD cards of 400 gb play a role?


 

Hopefully this brings you a bit further.


 

George


 

 

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

×