Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Spotify Playing/Paused events not handled
#1
(09-22-2024, 12:00 PM)Tim Curtis Wrote: I'll add librespot to watchdog for upcoming 9.1.2 release. 
I came here to search for this issue. In my case, indeed MoOde Spotify is sometimes not shown in the Spotify app. When I go to the MoOde web interface, it tells me that Spotify is already active. I can then use the Disconnect button to make MoOde Spotify available again in the Spotify app.
In this case it doesn't seem like librespot is crashing, but instead it is not disconnecting after playing has stopped and the connection is idle for some time. Similar to this librespot issue on GitHub
The issue is not new in 9.1.2 but I believe was introduced somewhere in the 9 series. Is there something that can be done about this, Tim?
Reply
#2
(10-05-2024, 07:33 PM)Sander Wrote:
(09-22-2024, 12:00 PM)Tim Curtis Wrote: I'll add librespot to watchdog for upcoming 9.1.2 release. 
I came here to search for this issue. In my case, indeed MoOde Spotify is sometimes not shown in the Spotify app. When I go to the MoOde web interface, it tells me that Spotify is already active. I can then use the Disconnect button to make MoOde Spotify available again in the Spotify app.
In this case it doesn't seem like librespot is crashing, but instead it is not disconnecting after playing has stopped and the connection is idle for some time. Similar to this librespot issue on GitHub
The issue is not new in 9.1.2 but I believe was introduced somewhere in the 9 series. Is there something that can be done about this, Tim?

IIRC the librespot event script only checked for events "started" and "stopped" and so I don't believe it ever responded to "play/pause" but I'll look into it in a bit.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
(10-05-2024, 08:38 PM)Tim Curtis Wrote:
(10-05-2024, 07:33 PM)Sander Wrote:
(09-22-2024, 12:00 PM)Tim Curtis Wrote: I'll add librespot to watchdog for upcoming 9.1.2 release. 
I came here to search for this issue. In my case, indeed MoOde Spotify is sometimes not shown in the Spotify app. When I go to the MoOde web interface, it tells me that Spotify is already active. I can then use the Disconnect button to make MoOde Spotify available again in the Spotify app.
In this case it doesn't seem like librespot is crashing, but instead it is not disconnecting after playing has stopped and the connection is idle for some time. Similar to this librespot issue on GitHub
The issue is not new in 9.1.2 but I believe was introduced somewhere in the 9 series. Is there something that can be done about this, Tim?

IIRC the librespot event script only checked for events "started" and "stopped" and so I don't believe it ever responded to "play/pause" but I'll look into it in a bit.

Here's the event log and it shows that only "started" and "stopped" events are processed confirming that "playing/paused" events are skipped.

I don't see anything in my notes about why they are skipped. Also I don't think there is any sort of idle timeout for librespot.

Code:
pi@moode9:~ $ tail -f /var/log/moode_spotevent.log
20241005 161456 Event: started: Processed
20241005 161457 Event: paused: Skipped
20241005 161513 Event: playing: Skipped
20241005 161513 Event: volume_set: Skipped
20241005 161513 Event: playing: Skipped
20241005 161531 Event: paused: Skipped
20241005 161542 Event: stopped: Processed
20241005 161832 Event: volume_set: Skipped
20241005 162920 Event: started: Processed
20241005 162921 Event: playing: Skipped
20241005 162947 Event: paused: Skipped
20241005 162954 Event: volume_set: Skipped
20241005 162954 Event: playing: Skipped
20241005 162954 Event: playing: Skipped
20241005 163016 Event: preloading: Skipped
20241005 163023 Event: paused: Skipped
20241005 163100 Event: stopped: Processed
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#4
I'll push a commit today that updates the event handling to use playing/paused instead of started/stopped.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#5
Thanks Tim.
Maybe 'moodeutl -R --spotify' in crontab at 3am is a workaround for me in the meantime.
Reply


Forum Jump: