Nested playlists, or creating linear "chains" in an otherwise random shuffle
Posted: 10 Jun 2021 09:55
Scenario: I want to load the first 5 episodes of GI Joe, the first 3 episodes of Transformers, the first 5 episodes of Jem and the Holograms, the first 3 episodes of Visionaries, the first 5 episodes of Ninja Turtles, several arbitrary episodes of The Real Ghostbusters, and (of course) My Little Pony: Rescue at Midnight Castle and My Little Pony: Escape from Catrina into a playlist. I want to play them in a mode similar to a random shuffle, EXCEPT that no episode in each series may be played unless all previous episodes in that series have also been played. In other words, if the shuffler "hits" episode 4 of Ninja Turtles but only episodes 1 and 2 of Ninja Turtles have been played so far, it'll play episode 3 instead, or just skip that episode and pick a new one until it hits a "legal" episode.
Scenario 2: The same as the above, but I add several arbitrary episodes of The Real Ghostbusters and He-Man to the playlist. While all of the previously mentioned series still cannot be played out of order, episodes of The Real Ghostbusters and He-Man are always "legal" and may be played in any order.
Scenario 3: I have a Midnight playlist, a 1 AM playlist, a 2 AM playlist, and so on. I want VLC to pick and play something from the Midnight playlist (either at random or whatever's next in the list), then something from the 1 AM playlist, then something from the 2 AM playlist, and so on. As an added bonus, some time slots would be internally set to shuffle while others would be internally set to play files in a particular order.
I believe all of these scenarios can be handled by different configurations of a single feature, which I could best describe as nested playlists or meta-playlists. Basically, you'd have a "meta-playlist", or a playlist of other playlists. The meta-playlist would have checkboxes for "loop" and "random", and below it, each individual playlist would also have checkboxes for Loop and Random. This feature would require a slight redesign of the Playlist tab/screen/window/whatever you want to call it, but that thing is a disaster and needs to be redesigned anyway. The Loop and Random buttons on the "main" or "now playing" screen (whatever you want to call it) would be grayed out while in meta-playlist mode, or perhaps they should just be permanently moved to the Playlist screen and turned into checkboxes.
Of course, there are some complications and details that need to be considered. It should not be possible to set the meta-playlist to loop unless one of its included playlists is also set to loop; this would be necessary to prevent VLC from exploding your computer when the meta-playlist is trying to loop but has no legal targets left to choose from. If the meta-playlist is set to Random, then the randomizer should give more "weight" to the longer playlists when choosing which one to play from; this is to ensure that files from the shorter playlists set to Loop will not be played more frequently than those from the longer playlists, and that shorter playlists that aren't set to Loop won't be exhausted before the longer playlists are (or in other words, if I have two episodes of My Little Pony in one playlist and 65 episodes of GI Joe in another, and I put those two playlists in a meta-playlist set to Random, there should be a 2 in 67 chance of playing a My Little Pony episode and a 65 in 67 chance of playing a GI Joe episode). Also, as NOYB has suggested, saving a meta-playlist should also save the Loop and Random settings of it and its included playlists.
Scenario 2: The same as the above, but I add several arbitrary episodes of The Real Ghostbusters and He-Man to the playlist. While all of the previously mentioned series still cannot be played out of order, episodes of The Real Ghostbusters and He-Man are always "legal" and may be played in any order.
Scenario 3: I have a Midnight playlist, a 1 AM playlist, a 2 AM playlist, and so on. I want VLC to pick and play something from the Midnight playlist (either at random or whatever's next in the list), then something from the 1 AM playlist, then something from the 2 AM playlist, and so on. As an added bonus, some time slots would be internally set to shuffle while others would be internally set to play files in a particular order.
I believe all of these scenarios can be handled by different configurations of a single feature, which I could best describe as nested playlists or meta-playlists. Basically, you'd have a "meta-playlist", or a playlist of other playlists. The meta-playlist would have checkboxes for "loop" and "random", and below it, each individual playlist would also have checkboxes for Loop and Random. This feature would require a slight redesign of the Playlist tab/screen/window/whatever you want to call it, but that thing is a disaster and needs to be redesigned anyway. The Loop and Random buttons on the "main" or "now playing" screen (whatever you want to call it) would be grayed out while in meta-playlist mode, or perhaps they should just be permanently moved to the Playlist screen and turned into checkboxes.
Of course, there are some complications and details that need to be considered. It should not be possible to set the meta-playlist to loop unless one of its included playlists is also set to loop; this would be necessary to prevent VLC from exploding your computer when the meta-playlist is trying to loop but has no legal targets left to choose from. If the meta-playlist is set to Random, then the randomizer should give more "weight" to the longer playlists when choosing which one to play from; this is to ensure that files from the shorter playlists set to Loop will not be played more frequently than those from the longer playlists, and that shorter playlists that aren't set to Loop won't be exhausted before the longer playlists are (or in other words, if I have two episodes of My Little Pony in one playlist and 65 episodes of GI Joe in another, and I put those two playlists in a meta-playlist set to Random, there should be a 2 in 67 chance of playing a My Little Pony episode and a 65 in 67 chance of playing a GI Joe episode). Also, as NOYB has suggested, saving a meta-playlist should also save the Loop and Random settings of it and its included playlists.