Fix LibrarySync crashing due to Plex Companion messages

This commit is contained in:
croneter 2018-06-24 11:19:42 +02:00
parent 66a8b1d723
commit 108944c4b2

View file

@ -1024,12 +1024,18 @@ class LibrarySync(Thread):
processes json.loads() messages from websocket. Triage what we need to processes json.loads() messages from websocket. Triage what we need to
do with "process_" methods do with "process_" methods
""" """
try:
if message['type'] == 'playing': if message['type'] == 'playing':
self.process_playing(message['PlaySessionStateNotification']) self.process_playing(message['PlaySessionStateNotification'])
elif message['type'] == 'timeline': elif message['type'] == 'timeline':
self.process_timeline(message['TimelineEntry']) self.process_timeline(message['TimelineEntry'])
elif message['type'] == 'activity': elif message['type'] == 'activity':
self.process_activity(message['ActivityNotification']) self.process_activity(message['ActivityNotification'])
except:
LOG.error('Processing of Plex Companion message has crashed')
LOG.error('Message was: %s', message)
import traceback
LOG.error("Traceback:\n%s", traceback.format_exc())
def multi_delete(self, liste, delete_list): def multi_delete(self, liste, delete_list):
""" """