From bb65f1b819123fa9efdcf4975bdf6d3a26a79bf4 Mon Sep 17 00:00:00 2001 From: onyx-and-iris <75868496+onyx-and-iris@users.noreply.github.com> Date: Tue, 2 Aug 2022 10:06:35 +0100 Subject: [PATCH] updates to reflect changes to vm-api and vban-cmd. patch bump --- poetry.lock | 6 +++--- pyproject.toml | 6 +++--- vmcompact/app.py | 5 ++--- vmcompact/menu.py | 1 + vmcompact/subject.py | 4 +--- 5 files changed, 10 insertions(+), 12 deletions(-) diff --git a/poetry.lock b/poetry.lock index 5d46b09..7f0248e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -75,7 +75,7 @@ python-versions = ">=3.4" [[package]] name = "vban-cmd" -version = "1.2.0" +version = "1.3.0" description = "Python interface for the VBAN RT Packet Service (Sendtext)" category = "main" optional = false @@ -83,7 +83,7 @@ python-versions = ">=3.11,<4.0" [[package]] name = "voicemeeter-api" -version = "0.3.0" +version = "0.6.0" description = "A Python wrapper for the Voiceemeter API" category = "main" optional = false @@ -92,7 +92,7 @@ python-versions = ">=3.11,<4.0" [metadata] lock-version = "1.1" python-versions = "^3.11" -content-hash = "32b324b39bf2c19f10c96c3fdc1799c9e3586e7a68c9214582ed947c7627d592" +content-hash = "ea4dab8cdb8451fe49568aac4688fad680c0b1c18213f2ad9e7b8a50e24c389c" [metadata.files] black = [ diff --git a/pyproject.toml b/pyproject.toml index 82f057b..7e66946 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "voicemeeter-compact" -version = "1.3.0" +version = "1.3.1" description = "A Compact Voicemeeter Remote App" authors = ["onyx-and-iris "] license = "MIT" @@ -15,8 +15,8 @@ include = ["vmcompact/img/cat.ico"] [tool.poetry.dependencies] python = "^3.11" sv-ttk = "^0.1" -voicemeeter-api = { version = "^0.3.0", python = "^3.10" } -vban-cmd = { version = "^1.2.0", python = "^3.10" } +voicemeeter-api = { version = "^0.6.0", python = "^3.10" } +vban-cmd = { version = "^1.3.0", python = "^3.10" } [tool.poetry.dev-dependencies] black = {version = "^22.6.0", allow-prereleases = true} diff --git a/vmcompact/app.py b/vmcompact/app.py index 03ab618..29c3298 100644 --- a/vmcompact/app.py +++ b/vmcompact/app.py @@ -34,13 +34,12 @@ class App(tk.Tk): super().__init__() self._vmr = vmr + self._vmr.event.add("ldirty") icon_path = Path(__file__).parent.resolve() / "img" / "cat.ico" if icon_path.is_file(): self.iconbitmap(str(icon_path)) self.minsize(275, False) self.subject = Subject() - self.strip_levels = None - self.bus_levels = None self["menu"] = Menus(self, vmr) self.styletable = ttk.Style() if _configuration.config: @@ -139,6 +138,6 @@ def connect(kind_id: str, vmr) -> App: try: VMMIN_cls = _apps[kind_id] - return VMMIN_cls(vmr) except KeyError: raise VMCompactErrors(f"Invalid kind: {kind_id}") + return VMMIN_cls(vmr) diff --git a/vmcompact/menu.py b/vmcompact/menu.py index d89e392..203a677 100644 --- a/vmcompact/menu.py +++ b/vmcompact/menu.py @@ -288,6 +288,7 @@ class Menus(tk.Menu): self.vban = vban_cmd.api(kind_id, **opts) # login to vban interface self.vban.login() + self.vban.event.add("ldirty") # destroy the current App frames self.parent._destroy_top_level_frames() _base_values.vban_connected = True diff --git a/vmcompact/subject.py b/vmcompact/subject.py index 0c7283d..509e308 100644 --- a/vmcompact/subject.py +++ b/vmcompact/subject.py @@ -20,10 +20,8 @@ class Subject: def remove(self, observer): """removes an observer from _observers""" - try: + if observer in self._observers: self._observers.remove(observer) - except ValueError: - print(f"{observer} not in observers (ungridded)") def get(self) -> list: """returns the current _observers"""