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():
This commit is contained in:
tomkat83 2016-12-28 13:18:50 +01:00
parent 9d2902baa5
commit 14c9d10459

View file

@ -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):