Move WebSocketListener to watch module
MODIFY
plextraktsync/factory.py
plextraktsync/factory.py
@@ -187,7 +187,7 @@ def enable_self_update(self):
@cached_property
def web_socket_listener(self):
- from plextraktsync.listener import WebSocketListener
+ from plextraktsync.watch.WebSocketListener import WebSocketListener
return WebSocketListener(plex=self.plex_server)

RENAME
plextraktsync/listener.py
plextraktsync/watch/WebSocketListener.py
-from time import sleep
+from __future__ import annotations
-from plexapi.server import PlexServer
+from time import sleep
+from typing import TYPE_CHECKING
from plextraktsync.events import Error
from plextraktsync.factory import logging
from plextraktsync.watch.EventDispatcher import EventDispatcher
+if TYPE_CHECKING:
+ from plexapi.server import PlexServer
+
class WebSocketListener:
def __init__(self, plex: PlexServer, poll_interval=5, restart_interval=15):

Move WebSocketListener to watch module