From 8ef66884df455894030223a4c650e2319c2447aa Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Wed, 10 Aug 2016 19:49:18 +0200 Subject: [PATCH] Fix PKC telling 'playing' instead of 'stopped' --- resources/lib/plexbmchelper/subscribers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/lib/plexbmchelper/subscribers.py b/resources/lib/plexbmchelper/subscribers.py index 6568f4f7..d9108911 100644 --- a/resources/lib/plexbmchelper/subscribers.py +++ b/resources/lib/plexbmchelper/subscribers.py @@ -142,7 +142,8 @@ class SubscriptionManager: self.cleanup() # Don't tell anyone if we don't know a Plex ID and are still playing # (e.g. no stop called). Used for e.g. PVR/TV without PKC usage - if not window('Plex_currently_playing_itemid'): + if (not window('Plex_currently_playing_itemid') + and not self.lastplayers): return True players = self.js.getPlayers() # fetch the message, subscribers or not, since the server @@ -168,6 +169,7 @@ class SubscriptionManager: pass # Process the players we have left (to signal a stop) for typus, p in self.lastplayers.iteritems(): + self.lastinfo[typus]['state'] = 'stopped' self._sendNotification(self.lastinfo[typus]) def _sendNotification(self, info):