From 14c9d10459699341640fc3aede8bf6dd9223a610 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Wed, 28 Dec 2016 13:18:50 +0100 Subject: [PATCH] Hopefully fix Plex Companion RuntimeError - RuntimeError: dictionary changed size during iteration 12:42:00 T:8236 ERROR: Traceback (most recent call last): 12:42:00 T:8236 ERROR: File "C:\Users\Tom\AppData\Roaming\Kodi\addons\plugin.video.plexkodiconnect\resources\lib\plexbmchelper\listener.py", line 213, in answer_request 12:42:00 T:8236 ERROR: subMgr.notify() 12:42:00 T:8236 ERROR: File "C:\Users\Tom\AppData\Roaming\Kodi\addons\plugin.video.plexkodiconnect\resources\lib\plexbmchelper\subscribers.py", line 163, in notify 12:42:00 T:8236 ERROR: self.notifyServer(players) 12:42:00 T:8236 ERROR: File "C:\Users\Tom\AppData\Roaming\Kodi\addons\plugin.video.plexkodiconnect\resources\lib\plexbmchelper\subscribers.py", line 178, in notifyServer 12:42:00 T:8236 ERROR: for typus, p in self.lastplayers.iteritems(): --- resources/lib/plexbmchelper/subscribers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lib/plexbmchelper/subscribers.py b/resources/lib/plexbmchelper/subscribers.py index b88ba0db..54a8207e 100644 --- a/resources/lib/plexbmchelper/subscribers.py +++ b/resources/lib/plexbmchelper/subscribers.py @@ -160,8 +160,8 @@ class SubscriptionManager: with threading.RLock(): for sub in self.subscribers.values(): sub.send_update(msg, len(players) == 0) - self.notifyServer(players) - self.lastplayers = players + self.notifyServer(players) + self.lastplayers = players return True def notifyServer(self, players):