[GH-ISSUE #300] Extend playerctl support #1095

Closed
opened 2026-03-14 13:25:57 +03:00 by kerem · 1 comment
Owner

Originally created by @FromWau on GitHub (Nov 26, 2023).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/300

Is your feature request related to a problem? Please describe.
Hi, I would like to keep using playerctl for my audio setup. But some playerctl commands don't get picked up by spotify-player.

Describe the solution you'd like
I noticed the following playerctl do not take effect on spotify-player:

  • playerctl shuffle

    • without options: display current shuffle state (current way: spotify_player get key playback | jq -r ".shuffle_state")
    • option on: Enable shuffling (current way: spotify_player playback shuffle)
    • option off: Disable shuffling (current way: spotify_player playback shuffle)
  • playerctl loop (repeat)

    • without options: Display current loop state (current way: spotify_player get key playback | jq -r ".repeat_state")
    • option none: Set loop state to noneoff (current way: none, we can only cycle)
    • option track: Set loop state to tracktrack (current way: none, we can only cycle)
    • option playlist: Set loop state to playlistcontext (current way: none, we can only cycle)
  • playerctl position (seek)

    • Seeking forwards (e.g.: 5+): Seeks forwards 5s (current way: spotify_player playback seek 5000)
    • Seeking backwards (e.g.: 5-): Seeks backwards 5s (current way: spotify_player playback seek -- -5000)
  • playerctl volume

    • without options: display current volume level (current way: spotify_player get key playback | jq -r ".device" | jq ".volume_percent")
    • Increment volume (e.g.: 0.05+): Increments volume level by 5% (current way: none)
    • Decrement volume (e.g.: 0.05-): Decrements volume level by 5% (current way: none)
    • Set a specific volume level (e.g.: 0.75): Set volume level to 75% (current way: spotify_player playback volume 75)
Originally created by @FromWau on GitHub (Nov 26, 2023). Original GitHub issue: https://github.com/aome510/spotify-player/issues/300 **Is your feature request related to a problem? Please describe.** Hi, I would like to keep using playerctl for my audio setup. But some playerctl commands don't get picked up by spotify-player. **Describe the solution you'd like** I noticed the following playerctl do not take effect on spotify-player: * `playerctl shuffle` - without options: display current shuffle state (current way: `spotify_player get key playback | jq -r ".shuffle_state"`) - option `on`: Enable shuffling (current way: `spotify_player playback shuffle`) - option `off`: Disable shuffling (current way: `spotify_player playback shuffle`) * `playerctl loop` (repeat) - without options: Display current loop state (current way: `spotify_player get key playback | jq -r ".repeat_state"`) - option `none`: Set loop state to `none` ⇾ `off` (current way: none, we can only cycle) - option `track`: Set loop state to `track` ⇾ `track` (current way: none, we can only cycle) - option `playlist`: Set loop state to `playlist` ⇾ `context` (current way: none, we can only cycle) * `playerctl position` (seek) - Seeking forwards (e.g.: `5+`): Seeks forwards 5s (current way: `spotify_player playback seek 5000`) - Seeking backwards (e.g.: `5-`): Seeks backwards 5s (current way: `spotify_player playback seek -- -5000`) * `playerctl volume` - without options: display current volume level (current way: `spotify_player get key playback | jq -r ".device" | jq ".volume_percent"`) - Increment volume (e.g.: `0.05+`): Increments volume level by 5% (current way: none) - Decrement volume (e.g.: `0.05-`): Decrements volume level by 5% (current way: none) - Set a specific volume level (e.g.: `0.75`): Set volume level to 75% (current way: `spotify_player playback volume 75`)
kerem 2026-03-14 13:25:57 +03:00
Author
Owner

@aome510 commented on GitHub (Nov 29, 2023):

The ability to handle media control events depends on the support from a third-party library:

github.com/Sinono3/souvlaki@384539fe83/src/lib.rs (L31-L52)

IIUC, seek should be supported with the SetPosition event and is already implemented from the spotify_player side. Other commands' support cannot be implemented unless souvlaki supports them. I would suggest you raise the issue to the upstream library if you want this feature implemented as spotify_player doesn't handle the low-level media control.

<!-- gh-comment-id:1831128310 --> @aome510 commented on GitHub (Nov 29, 2023): The ability to handle media control events depends on the support from a third-party library: https://github.com/Sinono3/souvlaki/blob/384539fe83e8bf5c966192ba28e9405e3253619b/src/lib.rs#L31-L52 IIUC, `seek` should be supported with the `SetPosition` event and is already implemented from the `spotify_player` side. Other commands' support cannot be implemented unless `souvlaki` supports them. I would suggest you raise the issue to the upstream library if you want this feature implemented as `spotify_player` doesn't handle the low-level media control.
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#1095
No description provided.