Add factory for web_socket_listener, watch_state_updater
MODIFY
plextraktsync/factory.py
plextraktsync/factory.py
@@ -116,6 +116,23 @@ def walker(self):
return w
+ @cached_property
+ def web_socket_listener(self):
+ from plextraktsync.listener import WebSocketListener
+
+ return WebSocketListener(plex=self.plex_server())
+
+ @cached_property
+ def watch_state_updater(self):
+ from plextraktsync.commands.watch import WatchStateUpdater
+
+ return WatchStateUpdater(
+ plex=self.plex_api(),
+ trakt=self.trakt_api(),
+ mf=self.media_factory(),
+ config=self.config(),
+ )
+
@cached_property
def logging(self):
import logging

Add factory for web_socket_listener, watch_state_updater