Closed NaiveInvestigator closed 2 years ago
Add this in input.conf
KEY script-message playlistmanager shuffle
to suffle at runtime. Although there is no function to reverse it. What use case do you have to return to original?
I need it cause sometimes i press shuffle by mistake, un-shuffling it would help in that case. mostly. And sometimes tho it is rare, while listening to songs I listen to some album songs in order that is why. But mostly it the first scenario that happens to me frequently and is annoying lol.
nvm I think i found a way to do it.
Using this js script:
var state = 0
var commands = [
'playlist-shuffle',
'playlist-unshuffle'
]
function perform_action() {
mp.command(commands[state])
state = (state + 1) % commands.length
}
mp.add_key_binding('i','toggle-shuffle', perform_action)
Thank you for the help! Feel free to close this issue.
playlist-unshuffle
cool I didn't know about this :+1:
I feel like it's a bit waste to re-implement that for this script. I think maybe this script shouldn't include a shuffle anyway nowadays. Not sure if anyone actually uses it over the native shuffle.
What this feature does is that, it shuffles the playlist if on but if turned off it will return to its original playlist.
Sorry bother you if this was already implemented but I can't figure out how to do it using this script. As you know using
cycle shuffle
doesn't actually work in runtime so I thought of using this script to do exactly that.