Playlist shuffle functionality broken - No "Expand Subdirectory" option in android builds?

VLC for Android and Chrome OS specific usage questions
User avatar
Alamei
New Cone
New Cone
Posts: 5
Joined: 23 Mar 2025 03:18

Playlist shuffle functionality broken - No "Expand Subdirectory" option in android builds?

Postby Alamei » 23 Mar 2025 03:34

I've been trying to find a way to get VLC on Android to properly shuffle playlists with multiple folders and subfolders for a several days now, and I can't seem to come up with any solution to make the shuffle function behave in a remotely useful manner when multiple folders are involved.

On the desktop version of VLC, there's a specific setting to force the expansion of subfolders in playlists, but I can't find any similar setting in the Android version, so VLC essentially gets "stuck" in whatever folder it starts in, exactly as described in this thread for core VLC. As noted in that thread, the only seeming solution for the poor shuffle behavior is to toggle on the expand subdirectory option available in the advanced settings for the desktop editions of VLC.

Am I missing something (e.g., a setting that can only be modified in a config file, or something along those lines) that would allow me to fix this behavior on VLC for Android, or is the shuffle feature just missing key functionality on mobile devices?

Aza
Developer
Developer
Posts: 2399
Joined: 14 Mar 2019 10:04

Re: Playlist shuffle functionality broken - No "Expand Subdirectory" option in android builds?

Postby Aza » 24 Mar 2025 07:08

Could you please explain exactly how your start your playback? You use the "browse screen" and how do you initiate the playback?

User avatar
Alamei
New Cone
New Cone
Posts: 5
Joined: 23 Mar 2025 03:18

Re: Playlist shuffle functionality broken - No "Expand Subdirectory" option in android builds?

Postby Alamei » 25 Mar 2025 01:28

I've actually tried a few different approaches to starting playback while troubleshooting, just to see if any made a difference:
1. Go to browse screen, highlight one or more folders (tap and hold), click play in the upper right corner.
3. Add the folders I want to play to a playlist in VLC, click on the playlist and click the shuffle button.
2. Go to browse screen, navigate inside the root folder I want to shuffle subfolders inside of, then play an individual file in that root folder that I put in there specifically for testing.

All three methods result in effectively the same behavior on my end of VLC getting "stuck" in whichever folder it starts in, with the only difference being that the first will always start with the first file in the first folder alphabetically of those I have selected, while the second will start on the first file in the first file in one of the random folders. The third obviously starts on the file I explicitly played, after which it navigates to one of the subfolders and promptly gets "stuck" in there.

Is there another way I should try to start playback that would produce different results for shuffling? I'm happy to test anything you think might be functional and report back.

Aza
Developer
Developer
Posts: 2399
Joined: 14 Mar 2019 10:04

Re: Playlist shuffle functionality broken - No "Expand Subdirectory" option in android builds?

Postby Aza » 25 Mar 2025 07:22

I just tested that out. The reason why we prevent expanding folder beforehand is because there are some cases where it can be very long (multiple minutes). It happens for example for folders with hundreds or thousands of files on slow servers or slow sdcards.

A workaround for you would be to indeed use playlists. But instead of selecting multiple folders to put them in a playlist, tap the 3-dot on one folder, add it to a playlist. Then do the same with all the folders you want to add to it.

Another one, without playlists, would be to select multiple folders and play them. Then, in the audio play queue, tap once on each folder to expand them.

Finally, the intended way: you could let the media library scan your folders and then use the audio screen to start your playbacks.

User avatar
Alamei
New Cone
New Cone
Posts: 5
Joined: 23 Mar 2025 03:18

Re: Playlist shuffle functionality broken - No "Expand Subdirectory" option in android builds?

Postby Alamei » 26 Mar 2025 07:11

I completely understand why you might not want expanding folders to be the only (or even the default) option for playlists from a performance standpoint, but would it be possible to add it as a toggleable option for users that do want functional shuffle behavior, similar to how the desktop version currently operates? Or, if it were easier, would it be possible to instead have a button on both audio and video playlists (since this limitation affects both equally) that would act as an "expand all folders now" action. In either case, a user would have to explicitly opt into the action (either via marking the setting or by manually calling the action), so they could reasonably be expected to understand and accept an extended load time in exchange for functional shuffle behavior.

I did unfortunately already stumble upon and rule out all of your suggested workarounds during my troubleshooting process, as they're each kludgy in different ways that make them not terribly functional, unless I'm missing an extra step:
  • Add folders manually to playlists one-by-one: This does result in proper shuffling, but each desired playlist would take ages to craft for a large library, since you'd have to do it for potentially hundreds of folders. It also results in a static playlist that doesn't reflect any new media added, renamed or deleted, requiring manual corrections.
  • Selecting multiple folders to play and tapping each sub-folder to expand it in the live playlist: I've been doing a variant of this (adding the folders to a playlist, starting playback from there, then tapping folders open) lately if I want to shuffle a small enough set of items to make it viable (say, something with 10 folders in it), but it once again becomes entirely untenable for any larger lists.
  • Playback via Media Library: When I tested this strategy, it seemed to be very functional if you want to shuffle all of your media, but it doesn't really help if you want to shuffle a specific folder with subfolders, so far as I could tell. To my understanding, there is no way to call for playback of files in the library based on their original folder structure, only based elements of the files themselves (or, in the case of videos, only by their name). This is the one where I feel like I may be missing something, though, so let me know if I'm just blind and there's a straightforward way to preload files into the library and then play a subset of them based on folder structure.
Thank you very much for looking into this and helping brainstorm solutions. I was starting to look into the code myself to see if I could draw up a patch, but my coding background is more on the back-end/server side of the equation (and lighter scripting languages like Python/PHP, only limited Java and no direct Kotlin experience), so I imagine that it would take me quite a long time to come up to speed on the codebase enough to be able to propose patches with such adjustments on my end.

Aza
Developer
Developer
Posts: 2399
Joined: 14 Mar 2019 10:04

Re: Playlist shuffle functionality broken - No "Expand Subdirectory" option in android builds?

Postby Aza » 27 Mar 2025 06:59

similar to how the desktop version currently operates
Correct me if I'm wrong but the desktop version is working the same way as the Android's one. If not, could you please tell me how you do it?

Now that I understand better your use case, I see why there is currently no proper solution to your issue yet. I'll try and think about it.

User avatar
Alamei
New Cone
New Cone
Posts: 5
Joined: 23 Mar 2025 03:18

Re: Playlist shuffle functionality broken - No "Expand Subdirectory" option in android builds?

Postby Alamei » 27 Mar 2025 07:21

Sorry, that's my bad for not being clearer about the specific option I was referring to in the desktop version. The default behavior on the desktop version is indeed identical to the Android version. I was referring to this toggle setting that you can access in the expanded ("All") preferences under the Playlist tab:

Image

The setting defaults to not taking any action, but if you set it to 'Expand', it will attempt to expand out subfolders whenever a folder is played in a playlist. I say "attempt" because I experimented with the setting on the desktop version further today, and the toggle still isn't particularly useful with complex folder structures, because it only expands out the first layer of subfolders, and it still requires you to manually touch each "root" subfolder to start the expansion process. As such, it wouldn't be worth trying to replicate the specific behavior of the option from the desktop version, but I think their fundamental idea of offering users a setting to specify the playlist behavior and defaulting it to the more performant option is a very reasonable approach.

If the setting were to be implemented in the Android version, I would recommend having it behave in a more intuitive manner, however, by simply fully expanding any folder as soon as it is added to the playlist. As you noted, this will have an obvious performance impact, but as long as the users have had to take an action to specifically request the behavior, I don't see that as being unreasonable. If I add a folder with thousands of files in it into any media player, whether on desktop or mobile, I never feel surprised if it takes a little while to process the load, and I'm happy to exchange the moderate delay for the ability to shuffle through a subset of albums or shows that I'm feeling in the mood for on a given day.

Aza
Developer
Developer
Posts: 2399
Joined: 14 Mar 2019 10:04

Re: Playlist shuffle functionality broken - No "Expand Subdirectory" option in android builds?

Postby Aza » 28 Mar 2025 06:49

Thanks for the clarification. I'll take a look.


Return to “VLC for Android and Chrome OS”

Who is online

Users browsing this forum: No registered users and 10 guests