hrkfdn / ncspot

Cross-platform ncurses Spotify client written in Rust, inspired by ncmpc and the likes.
BSD 2-Clause "Simplified" License
4.93k stars 206 forks source link

Shuffle mode not working when opening a playlist via MPRIS #654

Closed superjojo140 closed 2 years ago

superjojo140 commented 2 years ago

Describe the bug When shuffle is enabled and starting a playlist via ncspot's ncurses interface it starts with a random song and continues with another random song (as described in #128).

When opening a playlist via MPRIS with playerctl --player=ncspot open <PLAYLIST_URL> the playlist allways starts with the first song, even if shuffle mode is enabled.

I'm working on an embedded music playing device so i can't use ncspot directly via the ncures interface. How can i achive starting a playlist with a random song by a simple cli command?

To Reproduce Steps to reproduce the behavior:

  1. start ncspot
  2. enable shuffle mode
  3. execute playerctl --player=ncspot open https://open.spotify.com/playlist/37i9dQZF1DWZJhOVGWqUKF
  4. ncspot starts playing the playlist, but allways with the first song...

Expected behavior ncspot starts playing the playlist, but with a random song

System (please complete the following information):

Bettehem commented 2 years ago

I have now made a pull request which fixes this issue

superjojo140 commented 2 years ago

@Bettehem Thanks a lot. Does exactly what i want!

I cloned your fork and compiled it on my Raspberry Pi 3 for ARM (took about 3 hours...😔) and it works like a charm. Awesome👍🏼

Bettehem commented 2 years ago

Haha yeah Raspberry Pi build times are really long, but I'm glad it works!