[GH-ISSUE #42] Daemonize device ? #11

Closed
opened 2026-03-02 23:43:38 +03:00 by kerem · 11 comments
Owner

Originally created by @midnightexigent on GitHub (May 27, 2022).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/42

Currently whenever we leave the TUI, music stops playing. It would be better if music kept playing in the background.

Is such a feature in the roadmap ?

Originally created by @midnightexigent on GitHub (May 27, 2022). Original GitHub issue: https://github.com/aome510/spotify-player/issues/42 Currently whenever we leave the TUI, music stops playing. It would be better if music kept playing in the background. Is such a feature in the roadmap ?
kerem 2026-03-02 23:43:38 +03:00
Author
Owner

@midnightexigent commented on GitHub (May 27, 2022):

Actually after looking a bit further into this, I noticed that librespot itself is already a pretty feature-complete device/daemon. Is there any reason spotify-player needs to wrap librespot and be a device itself ? Can't it just be a tui client ?

<!-- gh-comment-id:1139936013 --> @midnightexigent commented on GitHub (May 27, 2022): Actually after looking a bit further into this, I noticed that librespot itself is already a pretty feature-complete device/daemon. Is there any reason spotify-player needs to wrap librespot and be a device itself ? Can't it just be a tui client ?
Author
Owner

@aome510 commented on GitHub (May 27, 2022):

Currently whenever we leave the TUI, music stops playing. It would be better if music kept playing in the background.

So spotify-player is made to be a TUI alternative to official Spotify app. Similar to the Spotify app, if you start streaming music there, quit the app will stop playing the music.

Is such a feature in the roadmap ?

Not in a roadmap atm, but add a --daemon option should be trivial and it will become handy when media control support is implemented. Without that, there is no point of running the app as a daemon as the only thing you can do with it is play music, e.g cannot toggle play/pause, next, prev, etc.

<!-- gh-comment-id:1139979577 --> @aome510 commented on GitHub (May 27, 2022): > Currently whenever we leave the TUI, music stops playing. It would be better if music kept playing in the background. So `spotify-player` is made to be a TUI alternative to official Spotify app. Similar to the Spotify app, if you start streaming music there, quit the app will stop playing the music. > Is such a feature in the roadmap ? Not in a roadmap atm, but add a `--daemon` option should be trivial and it will become handy when [media control support](https://github.com/aome510/spotify-player/issues/40) is implemented. Without that, there is no point of running the app as a daemon as the only thing you can do with it is play music, e.g cannot toggle play/pause, next, prev, etc.
Author
Owner

@jesyspa commented on GitHub (Mar 24, 2023):

As an alternative here: spotifyd already works as a spotify daemon, and by setting default_device I can automatically play from that. It would be nice if I could disable the spotify_player device entirely, since in such a setup I never want to play from it.

<!-- gh-comment-id:1482879583 --> @jesyspa commented on GitHub (Mar 24, 2023): As an alternative here: spotifyd already works as a spotify daemon, and by setting default_device I can automatically play from that. It would be nice if I could disable the spotify_player device entirely, since in such a setup I never want to play from it.
Author
Owner

@aome510 commented on GitHub (Mar 24, 2023):

It would be nice if I could disable the spotify_player device entirely, since in such a setup I never want to play from it.

You can disable the integrated client entirely by building the app without streaming feature (included as default features). One way to do it is:

cargo install spotify_player --no-default-features
<!-- gh-comment-id:1482886244 --> @aome510 commented on GitHub (Mar 24, 2023): > It would be nice if I could disable the spotify_player device entirely, since in such a setup I never want to play from it. You can disable the integrated client entirely by building the app without `streaming` feature (included as default features). One way to do it is: ``` cargo install spotify_player --no-default-features ```
Author
Owner

@jesyspa commented on GitHub (Mar 24, 2023):

Thanks, that's good to know. It would be a bit of a hassle to compile manually (I'm using the AUR package right now).
If you're open to it, I could put together a patch that adds this as a configuration option? Or is there something that makes that difficult to implement?

<!-- gh-comment-id:1482913422 --> @jesyspa commented on GitHub (Mar 24, 2023): Thanks, that's good to know. It would be a bit of a hassle to compile manually (I'm using the AUR package right now). If you're open to it, I could put together a patch that adds this as a configuration option? Or is there something that makes that difficult to implement?
Author
Owner

@aome510 commented on GitHub (Mar 24, 2023):

PRs are welcome! I never think about this, so I don't know if it would hard to implement.

That said, I still think using default_device should work as a config option in case you want to use another Spotify client.

<!-- gh-comment-id:1482924143 --> @aome510 commented on GitHub (Mar 24, 2023): PRs are welcome! I never think about this, so I don't know if it would hard to implement. That said, I still think using `default_device` should work as a config option in case you want to use another Spotify client.
Author
Owner

@jesyspa commented on GitHub (Mar 24, 2023):

Cool, I'll take a look this weekend!
default_device does work, but I often have two or more spotify_players open (my workflow involves multiple X sessions on one machine), and the list gets quite long which makes it a hassle if I e.g. want to switch the audio to my phone. So it's a minor thing, really.

<!-- gh-comment-id:1482932182 --> @jesyspa commented on GitHub (Mar 24, 2023): Cool, I'll take a look this weekend! `default_device` does work, but I often have two or more spotify_players open (my workflow involves multiple X sessions on one machine), and the list gets quite long which makes it a hassle if I e.g. want to switch the audio to my phone. So it's a minor thing, really.
Author
Owner

@aome510 commented on GitHub (Mar 24, 2023):

default_device does work, but I often have two or more spotify_players open (my workflow involves multiple X sessions on one machine), and the list gets quite long which makes it a hassle if I e.g. want to switch the audio to my phone

Look forward to your PR! Just a note that there is SwitchDevice command that allows you to transfer the playback to another device in case u may miss it.

<!-- gh-comment-id:1482978696 --> @aome510 commented on GitHub (Mar 24, 2023): > default_device does work, but I often have two or more spotify_players open (my workflow involves multiple X sessions on one machine), and the list gets quite long which makes it a hassle if I e.g. want to switch the audio to my phone Look forward to your PR! Just a note that there is `SwitchDevice` command that allows you to transfer the playback to another device in case u may miss it.
Author
Owner

@cheyngoodman commented on GitHub (Apr 23, 2023):

This feature could help spotify-player replace spotifyd. It seems extremely useful when combined with CLI commands.

With both features, spotify-player ould completely replace my spotifyd+spotify-tui workflow.

<!-- gh-comment-id:1519125999 --> @cheyngoodman commented on GitHub (Apr 23, 2023): This feature could help `spotify-player` replace [`spotifyd`](https://github.com/Spotifyd/spotifyd). It seems extremely useful when combined with [CLI commands](https://github.com/aome510/spotify-player/pull/159). With both features, `spotify-player` ould completely replace my `spotifyd`+`spotify-tui` workflow.
Author
Owner

@aome510 commented on GitHub (Apr 23, 2023):

@cheyngoodman in case u may miss, you don't need a "spotifyd+spotify-tui" kind of workflow with spotify-player as the app itself has an integrated Spotify client for streaming, so you don't need another client like spotifyd.

I think the daemon device is only good when you use with the CLI app to control the music without an UI. Is that what you means by your "spotifyd+spotify-tui" workflow?

<!-- gh-comment-id:1519130303 --> @aome510 commented on GitHub (Apr 23, 2023): @cheyngoodman in case u may miss, you don't need a "spotifyd+spotify-tui" kind of workflow with `spotify-player` as the app itself has an integrated Spotify client for streaming, so you don't need another client like `spotifyd`. I think the daemon device is only good when you use with the CLI app to control the music **without an UI**. Is that what you means by your "spotifyd+spotify-tui" workflow?
Author
Owner

@cheyngoodman commented on GitHub (Apr 23, 2023):

Right, I wish to use the UI for browsing or managing playlists occasionally, but I'm mostly playing music without the interface.

I'm hoping to completely replace spotify-tui with spotify_player for controlling the music without a UI. Then, if possible with this daemon feature I can also replace spotifyd with spotify_player.

I'm getting close to my preferred workflow with spotifyd for playing without UI + playerctl for controlling + spotify_player for browsing. It's almost perfect but playerctl cannot like/unlike and struggles with volume.

I'm hoping spotify_player replace all the spotify related apps I use.

<!-- gh-comment-id:1519134562 --> @cheyngoodman commented on GitHub (Apr 23, 2023): Right, I wish to use the UI for browsing or managing playlists occasionally, but I'm mostly playing music without the interface. I'm hoping to completely replace `spotify-tui` with `spotify_player` for controlling the music without a UI. Then, if possible with this daemon feature I can also replace `spotifyd` with `spotify_player`. I'm getting close to my preferred workflow with `spotifyd` for playing without UI + `playerctl` for controlling + `spotify_player` for browsing. It's almost perfect but `playerctl` cannot like/unlike and struggles with volume. I'm hoping `spotify_player` replace all the spotify related apps I use.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-player#11
No description provided.