Need better handling of deleted/renamed folders containing playlists

Issue description:

Sorry if this is too long. 3 related issues numbered at the bottom. My playlists worked until I deleted and restored them, then they won’t play. All paths in the playlists are absolute, starting with /storage/emulated/0/

I don’t use the cloud at all. I have my own generated playlists (1500 or so) and my own MP3 files (7000 or so, 50GB) which “live” on my PC. Modified playlists and the MP3s are copied to nested folders on my Android (Samsung S23 Ultra) after I make changes. I don’t import anything, I add the top folder (Library > Files > Local Device > Add Source) and use the Library > Files interface to play my playlists. The app’s “playlists” page remains empty.

I just replaced/renamed my top folder and used the Settings > Manage Media Provider > Local device page “sync” option. The old folder stays in the Library > Files > Local device list as “empty” when it’s actually missing. It’s not possible to remove the old folder from this page. Oddly, folders which do exist can be removed here unlike those which are missing. (The empty folder can be removed under Settings > Manage Media Provider > Local device.)

After replacing the entire playlist tree (as described above) but without touching the MP3 files, any attempt to play a playlist shows the popup “Preparing your medias, please wait” followed by the popup “No playable media!”. I saw another post about scanning remote media, but given the way I’m using the tool there’s no import so there’s no feedback on progress.

Logs have been uploaded. Here’s my test: I deleted the old folder in the file system, turned on Debug in the app, exited and stopped the app, copied playlists to a new folder (/playlists in Internal Storage), started the app, added the folder under Library > Files, navigated to and tried to play a file system playlist from my new folder. I got the two popups described above. I checked the Manage Media page under Settings, and the new folder was NOT listed even though I had added it to the Library > Files page. I added it in Manage Media and then tried again, same results every time. I did notice the Settings (gear) icon was colored and spinning… but that’s the Debug mode and not an indication the app is scanning the file system. Then I restarted the phone and restarted the app. Same result. Playlist has no playable media. I minimized the app and did other things for a while. Waiting didn’t work. Restarting didn’t work. Syncing didn’t work.

  1. Bug: I think it’s a bug to label a folder as empty when it is really missing. Please notice when a folder is missing instead of empty, say that instead, and maybe even offer to remove it from the library.

  2. Request: Add the same option to remove an added folder wherever it can be seen. Don’t make me go to Settings to get rid of it when I didn’t go there to add it. Manage Media and Library Files should always be kept in sync by the app. I shouldn’t have to go add/remove in both places.

  3. Bug: If the app is still scanning media or playlist files, don’t report a playlist as having no playable media when the media actually exists and will become playable after some delay. Either switch focus to the requested playlist and display a popup asking to wait while that finishes (and then play it when possible), or at least have the popup say it’s not done scanning and some playlists might not work until that’s finished. (Is there a way to know the app is scanning and what the progress is? Remember I’m not importing anything and all files are on the phone’s internal memory.)

Logs:

Upload description: SRE logs

Additional information:

 
I’m also requesting that folders under Library Files and under Settings be treated the same way. Adding in one place does not currently make it show in the other, and missing folders cannot be deleted under Library Files.
 

Reproduction steps:

 
Add a nested tree full of playlists under Library Files. Play the playlists. Delete the tree. Copy the same playlist tree to a new top folder name, add the new folder under Library Files. Playlists will not play, app reports no playable media. Playlists have not changed!
 

Media provider:

Local device

Screenshots:

     

So to resume you did not really read the docs and want me to adapt the app to your needs and not the other way around :wink:

You mix a lot of different things and concepts here…

The folders you select in the provider configuration are the folders that will be scanned for content that will be present in the library and so can be handled by playlists.
So this is where you need to configure where your music is and will always have to.

You can also optionally add manual sources in the file section to be able to browse a folder and play it’s content without that content being added to the library. That content will not be seen from the library or the playlists.

TL;DR; Everything works as expected.

Thank you for your fast reply! Perhaps you can point me to which part of the docs I missed.

I set it up and it worked the way I wanted. Then I deleted and restored files and SOMETHING changed… but I don’t know what. Can you point me in the right direction? The playlists have valid paths in them and the folder containing the playlists was added manually under Library > Files, but the app says the playlists are no longer playable.

I did, as you say, “add manual sources in the file section to be able to browse a folder and play it’s content”. That’s exactly what I want, no changes required. Hopefully the logs show that. It finds the playlists. It finds the music if I browse to the MP3 folders. It does not find the music the playlists point to. That’s what confuses me.

In my original reply, I asked some questions about the debug logs. Since then I figured out how to view the log file so I deleted those questions. In an error message, the log file contains this path for one of my playlists: “url=tag://content://com.android.externalstorage.documents/tree/primary%3APlaylists/document/primary%3APlaylists%2FGenre%2FBlues%2FBlues.m3u”

While reading that playlist, the log shows the path to my music file: “Playlist relative: Playlists/Genre/Blues” and “Playlist mapping: /storage/emulated/0/Symfonium/Albums/Eric Clapton/Unplugged/10 - Alberta.mp3 → Symfonium/Albums/Eric Clapton/Unplugged/10 - Alberta.mp3 = Symfonium/Albums/Eric Clapton/Unplugged/10 - Alberta.mp3”

That is followed by the error “Verbose/PlaybackController: No playable media to play”

So the app removes the absolute path to create a relative path, which DOES exist, but can’t find that mp3 file. Is it expecting some other format in the playlist? Forward slashes and spaces have been OK with other players but based on the reported path of the playlist perhaps spaces and slashes need to be encoded?

I’m trying in good faith. I’m not a novice. Please advise.

I just explained you that it’s now how it works …
You can’t have playlists that takes files that are not scanned …
You need to properly configure your media provider to have the proper folders.

So properly configure the media provider and it will work.

As I said in my original post, I have tried removing and replacing the media provider (local device) and adding the folder(s) at that time. That failed.

I didn’t realize we were working in real time. I edited the post you replied to. Oops! Here’s the good part again:

The log file contains this path for one of my playlists: “url=tag://content://com.android.externalstorage.documents/tree/primary%3APlaylists/document/primary%3APlaylists%2FGenre%2FBlues%2FBlues.m3u”

While reading that playlist, the log shows the path to my music file: “Playlist relative: Playlists/Genre/Blues” and “Playlist mapping: /storage/emulated/0/Symfonium/Albums/Eric Clapton/Unplugged/10 - Alberta.mp3 → Symfonium/Albums/Eric Clapton/Unplugged/10 - Alberta.mp3 = Symfonium/Albums/Eric Clapton/Unplugged/10 - Alberta.mp3”

That is followed by the error “Verbose/PlaybackController: No playable media to play”

So the app removes the absolute path to create a relative path, which DOES exist, but can’t find that mp3 file. Is it expecting some other format in the playlist? Forward slashes and spaces have been OK with other players but based on the reported path of the playlist perhaps spaces and slashes need to be encoded?

I’m trying in good faith. I’m not a novice. Please advise.

One possible disconnect is where the proper folders are added. This can be done under Settings > Manage Media Providers > Local Device, and also under Library > Files. > Media Providers > Local Device The two places do not stay in sync.

As said twice: This is the only valid place, configure the provider, scan then it will work.

By “scan”, do you mean “sync” from the 3-dots menu next to the “local device” media provider? Just did that. Again. It doesn’t work.

You do not show your settings or anything, does not work does not help …

Remove everything you added to the Library files, remove the local provider.
Add the local provider in SAF mode and select Symfonium as the root folder.

Sync wait for all the songs to be seen then import your playlist …

Done. How do I know when all the songs have been seen?

As for showing settings, I thought that was what the debug log was for. Should I be sending screenshots?

One last question: Under what circumstances would I want to click the “add source” button under Library > Files > Local Device ? Sources added under Settings show here, along with the Add Source button.

And please hear me when I say “thank you” again. I’m not used to such responsive support and I truly do value your time.

Already told you :wink:

For the record there’s plenty of docs: Docs