diff --git a/syng/client.py b/syng/client.py index 077c03d..c59665d 100644 --- a/syng/client.py +++ b/syng/client.py @@ -125,9 +125,6 @@ class State: config: dict[str, Any] = field(default_factory=default_config) -# state: State = State() - - class Client: def __init__(self, config: dict[str, Any]): config["config"] = default_config() | config["config"] @@ -215,8 +212,6 @@ class Client: await source.skip_current(Entry(**data)) self.player.skip_current() - # if self.state.current_source is not None: - # await self.state.current_source.skip_current(Entry(**data)) async def handle_state(self, data: dict[str, Any]) -> None: """ diff --git a/syng/gui.py b/syng/gui.py index fcf15b9..219cc82 100644 --- a/syng/gui.py +++ b/syng/gui.py @@ -73,7 +73,6 @@ from .config import ( ) -# TODO: ScrollableFrame class OptionFrame(QWidget): def add_bool_option(self, name: str, description: str, value: bool = False) -> None: label = QLabel(description, self) @@ -593,15 +592,10 @@ class SyngGui(QMainWindow): self.qr_label = QLabel(self.qr_widget) self.linklabel = QLabel(self.qr_widget) - # self.notification_label = QTextEdit(self.qr_widget) - # self.notification_label.setReadOnly(True) - # QLabel("", self.qr_widget) self.qr_layout.addWidget(self.qr_label) self.qr_layout.addWidget(self.linklabel) - # self.qr_layout.addWidget(self.notification_label) self.qr_layout.setAlignment(self.linklabel, Qt.AlignmentFlag.AlignCenter) - # self.qr_layout.setAlignment(self.notification_label, Qt.AlignmentFlag.AlignCenter) self.qr_layout.setAlignment(self.qr_label, Qt.AlignmentFlag.AlignCenter) self.linklabel.setOpenExternalLinks(True) @@ -790,7 +784,6 @@ class SyngGui(QMainWindow): config = self.gather_config() self.client = Client(config) asyncio.run_coroutine_threadsafe(self.client.start_client(config), self.loop) - # self.notification_label.setText("") self.timer.start(500) self.set_client_button_stop() else: @@ -847,7 +840,6 @@ class LoggingLabelHandler(logging.Handler): def run_gui() -> None: - # initialize cache dir os.makedirs(platformdirs.user_cache_dir("syng"), exist_ok=True) base_dir = os.path.dirname(__file__) if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS"): diff --git a/syng/server.py b/syng/server.py index 614e5d3..2df88f0 100644 --- a/syng/server.py +++ b/syng/server.py @@ -446,7 +446,6 @@ class Server: state.sid, ) state.client.config = DEFAULT_CONFIG | config - # await self.sio.emit("update_config", config, room) except JSONDecodeError: await self.sio.emit("err", {"type": "JSON_MALFORMED"}, room=sid) @@ -1310,8 +1309,6 @@ class Server: # The internal loop counter does not use a regular timestamp, so we need to convert between # regular datetime and the async loop time now = datetime.datetime.now() - # today = datetime.datetime(now.year, now.month, now.day) - # next_run = today + datetime.timedelta(days=1) next_run = now + datetime.timedelta(hours=1) offset = next_run.timestamp() - now.timestamp() diff --git a/syng/sources/source.py b/syng/sources/source.py index bdc0ff0..5173645 100644 --- a/syng/sources/source.py +++ b/syng/sources/source.py @@ -27,8 +27,6 @@ from ..entry import Entry from ..result import Result from ..config import BoolOption, ConfigOption -# logger: logging.Logger = logging.getLogger(__name__) - class EntryNotValid(Exception): """Raised when an entry is not valid for a source.""" @@ -385,8 +383,6 @@ class Source(ABC): logger.warning(f"{self.source_name}: done") if new_index is not None: self._index = new_index - # chunked = zip_longest(*[iter(new_index)] * 1000, fillvalue="") - # return [{"index": list(filter(lambda x: x != "", chunk))} for chunk in chunked] return await self.get_config() return None