mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[GH-ISSUE #1547] session_connected and session_disconnected events fail to fire #701
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#701
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 @samcook on GitHub (Aug 22, 2025).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1547
Description
The
session_connectedandsession_disconnectedevents fail to fire when connecting or disconnecting Spotify Connect since upgrading raspotify from0.46.1(which useslibrespot 0.6.0 383a6f6) to0.46.2(which useslibrespot 0.6.0-dev ba3d501). When working, this triggers some automation to power on/off my AV receiver.Version
librespot 0.6.0-dev
ba3d501(Built on 2025-08-11, Build ID: o42TOKj2, Profile: release)How to reproduce
librespot(viaraspotify) with an event handler script configured.session_connectedevent to fire, executing script which logs the event and turns on AV receiver.session_disconnectedevent to fire, executing script which logs the event and turns off AV receiver.Log
Here's some (non-verbose) log of connecting then disconnecting Spotify Connect. The log lines about events firing are from my event handler script.
The
couldn't load context info because: context is not availablewarnings seem suspicious, and weren't happening in the previous version where things were working as expected.There's quite a lot more logged in verbose mode which I can supply if needed.
For reference, this is what I was seeing on the previous version while doing the same actions:
Host (what you are running
librespoton):@roderickvd commented on GitHub (Aug 23, 2025):
@photovoltex @kingosticks or other community members: any takers for this one? This may be a regression relevant to streaming distros that we don’t want in v0.7.
@photovoltex commented on GitHub (Aug 23, 2025):
I could maybe look later in the evening. And btw. what is considered a connect and disconnect? Does this mean when the device becomes the active one and when it loses it. Or is it related to when we start up and shutdown?
@roderickvd commented on GitHub (Aug 23, 2025):
That’d be great ❤️ It’s when a user connects or disconnects: https://github.com/librespot-org/librespot/wiki/Events. In dealer parlance I guess this is equivalent to becoming or stopping to be the active device.
@photovoltex commented on GitHub (Aug 23, 2025):
For the connect I can confirm that it doesn't run through the usual start playing branch, which results that the event doesn't seem to be fired when we connect and isn't fired again when we try to play or load anything because we are already the active device. For the disconnect I can also confirm but didn't look to much into it. Should be easy to fix, I will give you a PR later on.