From 326970e5adcb815e3249c0c249bdbfdc1943990d Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Wed, 14 Nov 2012 23:42:33 +0100 Subject: [PATCH] core: Explain reason behind temporary state syncing hack --- mopidy/core/actor.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mopidy/core/actor.py b/mopidy/core/actor.py index 858eeaf9..3ebb785b 100644 --- a/mopidy/core/actor.py +++ b/mopidy/core/actor.py @@ -57,7 +57,11 @@ class Core(pykka.ThreadingActor, AudioListener): def state_changed(self, old_state, new_state): # XXX: This is a temporary fix for issue #232 while we wait for a more - # permanent solution with the implementation of issue #234. + # permanent solution with the implementation of issue #234. When the + # Spotify play token is lost, the Spotify backend pauses audio + # playback, but mopidy.core doesn't know this, so we need to update + # mopidy.core's state to match the actual state in mopidy.audio. If we + # don't do this, clients will think that we're still playing. if (new_state == PlaybackState.PAUSED and self.playback.state != PlaybackState.PAUSED): self.playback.state = new_state