M3U Playlist import issue - "No playlist content to import media"

Issue description:

When I try to import a local m3u playlist file I always get the message “No playable media” or “No playlist content to import”, depending on whether I’m using relative or absolute paths. In both cases Poweramp is able to handle the playlist files just fine.

Logs:

Upload description: manyfolds

Additional information:

 Not provided 

Reproduction steps:

 Not provided 

Media provider:

Local device

Screenshots:

     

On the 2 logs your playlists are using relative paths but wrong ones.

I suppose PowerAmp have tons of hacks for all the possibly wrong playlists.

You are in the folder “Music/Playlists” and your relative path are “Music/Playlists/storage/emulated/0/Music/Extra/”

That would mean that the files are actually stored in
“Music/Playlists/Music/Playlists/storage/emulated/0/Music/Extra/”

Something I’m pretty sure does not exist.

Please clarify you folder organisation.

I have tried a proper relative path (the line starts with …/Extra), and the playlist is imported successfully.
But ideally I’d like to use absolute paths. My m3u contains one line which starts with /storage/emulated/0/Music/Extra, which would be an absolute path, no? I have tested another app (Retro music player) which imports this successfully as well.

They are absolute path in the ancient world where we had access to files.

Now in the stupid Google SAF world, we do not have access to the actual path and the root of the path is the folder you added as SAF source.

With that said I can probably try to hack things for a few well known root path like that one, but not all phones use the same values and sdcard use random values.

Got it. Special cases for such known paths would be nice too. Other players seem to already do it and I feel like it would cover 9 out of 10 cases even if not all phones have the same structure.