Skip to content

PaperNick/mpv-playlist-shuffle

Repository files navigation

MPV Playlist Shuffle

MPV script to toggle playlist shuffle on/off on the fly without restarting playback.

When the playlist is shuffled, you can choose to keep playing the current track or jump to the first one.

Installation

Note

Pre-compiled versions are available on the releases page

Compile the project and copy the script to your mpv scripts folder:

npm ci
npm run build
cp dist/toggle-playlist-shuffle.js ~/.config/mpv/scripts/

Configuration (optional)

Create a file in ~/.config/mpv/script-opts/toggle-playlist-shuffle.conf with any of the following options:

Option Default Values Description
shuffle_action play_current play_current / play_first What to do with the current track when enabling shuffle
key_toggle ctrl+shift+s Your desired keyboard shortcut Keybinding to toggle shuffle
  • play_current: shuffle and keep playing the current track
  • play_first: shuffle and jump to the first track

Example

shuffle_action=play_first
key_toggle=alt+s