aome510 / spotify-player

A Spotify player in the terminal with full feature parity
MIT License
3.52k stars 153 forks source link

spotify_player stop music when quitting it #567

Open oliv3340 opened 3 weeks ago

oliv3340 commented 3 weeks ago

Hi, thanks for your work. Awesome app! I use it and love it a lot!

Describe the bug When I launch a song in spotify_player (the Spotify app launches but does not play anything), it works but stops as soon as I quit the app from the terminal. However, if I launch a song from Spotify itself first, other manipulations work as expected. When I play music from spotify_player, I can relaunch it after quitting spotify_player using the "play" button on my keyboard, but it would be better if the music didn't stop at all. I don't know if something can be done about this.

To Reproduce On macOS (I don't know about other systems):

  1. Launch the Spotify app.
  2. Play a song in spotify_player.
  3. Quit spotify_player (the music should stop).

Expected behaviour Music shouldn't stop after quitting spotify_player.

Log and backtrace Only infos in logs (nothing intersting) and no backtrace on the issue.

Environment

Additional context I've install spotify_player with homebrew.

aome510 commented 2 weeks ago

hmm music stops when you close the app is kinda unexpected when streaming is handled by the app. Not sure what is the bug here. Do you specifically mean if you stream music from an external source and use spotify_player as the remote control device, quitting the app stops the music played by the external source?

derekbunch commented 2 weeks ago

this also happens for me.

if i start streaming from the spotify app it will keep playing, but if i start playing from spotify_player it will stop as soon as spotify_player is quit.

ive tested these scenarios

  1. spotify app is running, but not playing anything
  2. start music with spotify_player
  3. quit spotify_player
  4. music stops ❌

  1. spotify app not running
  2. start music with spotify_player
  3. quit spotify_player
  4. music stops ❌

  1. start music with spotify app
  2. change track with spotify_player
  3. quit spotify_player
  4. music still plays ✅

  1. spotify app is running, but not playing anything
  2. start music with spotify_player
  3. change music with spotify app
  4. quit spotify_player
  5. music stops ❌

so it seems to be only when streaming originates from spotify_player

Environment macOS Sonoma 14.6.1 (23G93) (M3 Pro, Nov 2023 MacBook Pro 16)

❯ spotify_player -V
spotify_player 0.19.1
aome510 commented 2 weeks ago

look expected to me. Not sure why you guys expect music to continue playing when exiting the spotify_player app when music is from the app.

derekbunch commented 1 week ago

I don't think we expected it to keep running (or that was not my understanding). It makes sense that it doesn't.

I think we were just saying it would be nice if it could continue running after exiting (like with a daemon or something)

Edit: I guess to be fair, I can just ctrl-z or run it in a tmux pane and it's fine, not a big deal

aome510 commented 1 week ago

I think we were just saying it would be nice if it could continue running after exiting (like with a daemon or something)

I see. That means it should be feature request instead of a bug report. spotify_player does support daemon mode. See https://github.com/aome510/spotify-player?tab=readme-ov-file#daemon for more details