[GH-ISSUE #189] Additional events for --onevent argument #130

Closed
opened 2026-02-27 19:29:00 +03:00 by kerem · 4 comments
Owner

Originally created by @RealOrangeOne on GitHub (Mar 11, 2018).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/189

The onevent API is very useful to generate additional UI ontop of librespot, without having to re-implement most of the CLI, however it's missing many events which could be useful.

  • Device connection / disconnection
  • Differing pause and stop events
  • Play time (although this may not be possible with Spotify's API)

Looking through the runtime logs, there's lots of output from librespot_connect::spirc. Potentially these events could be channelled into the existing PlayerEvent flow. I feel it's better to have too many events, that the user can filter out, than too few, and I have to parse the stdout of the process (something I was partially tempted to do).

If someone could point me to the best location to put the call to run_program, I'd be happy to contribute the code myself!

Originally created by @RealOrangeOne on GitHub (Mar 11, 2018). Original GitHub issue: https://github.com/librespot-org/librespot/issues/189 The `onevent` API is very useful to generate additional UI ontop of `librespot`, without having to re-implement most of the CLI, however it's missing many events which could be useful. - Device connection / disconnection - Differing pause and stop events - Play time (although this may not be possible with Spotify's API) Looking through the runtime logs, there's lots of output from `librespot_connect::spirc`. Potentially these events could be channelled into the existing `PlayerEvent` flow. I feel it's better to have too many events, that the user can filter out, than too few, and I have to parse the `stdout` of the process (something I was partially tempted to do). If someone could point me to the best location to put the call to `run_program`, I'd be happy to contribute the code myself!
kerem closed this issue 2026-02-27 19:29:00 +03:00
Author
Owner

@michaelherger commented on GitHub (Mar 11, 2018):

Seems to be under investigation. See eg. github.com/ashthespy/librespot@545c9eaa97

<!-- gh-comment-id:372109655 --> @michaelherger commented on GitHub (Mar 11, 2018): Seems to be under investigation. See eg. https://github.com/ashthespy/librespot/commit/545c9eaa9732bc7fe0236289ac931185930a6d55
Author
Owner

@RealOrangeOne commented on GitHub (Mar 11, 2018):

ooh, awesome! I hope to see that merged at some point 👍

<!-- gh-comment-id:372114653 --> @RealOrangeOne commented on GitHub (Mar 11, 2018): ooh, awesome! I hope to see that merged at some point :+1:
Author
Owner

@sashahilton00 commented on GitHub (Mar 11, 2018):

Thanks for getting started on this, my plan is to add events from SpIRC as well. As you said, having too many is better, as we'll eventually send them out as JSON in librespotd

<!-- gh-comment-id:372124050 --> @sashahilton00 commented on GitHub (Mar 11, 2018): Thanks for getting started on this, my plan is to add events from SpIRC as well. As you said, having too many is better, as we'll eventually send them out as JSON in librespotd
Author
Owner

@ashthespy commented on GitHub (Mar 14, 2018):

Gimme a few days, will clean this up and submit a PR for a proper review :-)

I'm aiming to incorporate the events @sashahilton00 mentions at https://github.com/plietar/librespot/issues/37#issuecomment-172688099

<!-- gh-comment-id:373183020 --> @ashthespy commented on GitHub (Mar 14, 2018): Gimme a few days, will clean this up and submit a PR for a proper review :-) I'm aiming to incorporate the events @sashahilton00 mentions at https://github.com/plietar/librespot/issues/37#issuecomment-172688099
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/librespot#130
No description provided.