Restart websocket if connection was closed
MODIFY
plex_trakt_sync/listener.py
plex_trakt_sync/listener.py
@@ -29,6 +29,10 @@ def handler(data):
for handler in self.event_handlers[event_type]:
handler(data)
+ while True:
notifier = self.plex.startAlertListener(callback=handler)
while notifier.is_alive():
sleep(self.interval)
+
+ self.logger.debug(f"Listener finished. Restarting in {self.interval}")
+ sleep(self.interval)

Restart websocket if connection was closed