mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[GH-ISSUE #25] Implement some sort of State handler with some sort of RO-API #13
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sashahilton00 on GitHub (Jan 29, 2018).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/25
Thursday Jan 14, 2016 at 14:41 GMT
Originally opened as https://github.com/plietar/librespot/issues/37
Is there a way to notice when a device connects / disconnects?
and could we supply some kind of state file for tracking?
what i have in mind is another argument to enable that feature and if enabled create a file where librespot writes the current state (like the proc file system on linux just a single line which gets updated on state changes)
example content of that file:
Device connects:
"connected"
Device disconnects:
"noendpoint"
Device disconnects and no music playing or end of playlist:
"noendpointnotplaying"
@sashahilton00 commented on GitHub (Jan 29, 2018):
Monday Jan 18, 2016 at 23:59 GMT
Agreed, this is a must have for the library given that it is going to be standalone. As per the gitter chat, here is a list of possible event emitters that it would be good to have:
I'm sure there are more, but I think this is more than good enough to start with.
@sashahilton00 commented on GitHub (Jan 29, 2018):
Tuesday Jan 19, 2016 at 00:08 GMT
Native Spotify clients seem to periodically report playback progress to their servers, maybe that's another possible event (some kind of a heartbeat).
There are also a couple error events, like not authorized (anymore), song not available in target market, too many requests, premium required, app key invalid/banned...
@sashahilton00 commented on GitHub (Jan 29, 2018):
Tuesday Jan 19, 2016 at 00:08 GMT
Good point, I forgot about the errors.
@sashahilton00 commented on GitHub (Feb 1, 2018):
Closing this, as it comes under the broader issue of Metadata, which is being tracked in #7