From 79260a0e475c50a248c754d5e82d3110d753a5eb Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Thu, 10 Aug 2023 21:24:59 +0100 Subject: [PATCH] check vban direction check that index is numeric remove button as possible key. not defined in RT packets anyway patch bump --- README.md | 2 ++ __main__.py | 1 + pyproject.toml | 2 +- vban_cmd/vbancmd.py | 12 +++++++++--- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 66ee59a..eb6febe 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,7 @@ def main(): { "strip-2": {"A1": True, "B1": True, "gain": -6.0}, "bus-2": {"mute": True, "eq": {"on": True}}, + "vban-in-0": {"on": True}, } ) @@ -355,6 +356,7 @@ vban.apply( "strip-0": {"A1": True, "B1": True, "gain": -6.0}, "bus-1": {"mute": True, "mode": "composite"}, "bus-2": {"eq": {"on": True}}, + "vban-in-0": {"on": True}, } ) ``` diff --git a/__main__.py b/__main__.py index f7e0e03..2d5bc2b 100644 --- a/__main__.py +++ b/__main__.py @@ -37,6 +37,7 @@ def main(): { "strip-2": {"A1": True, "B1": True, "gain": -6.0}, "bus-2": {"mute": True}, + "vban-in-0": {"on": True}, } ) diff --git a/pyproject.toml b/pyproject.toml index 7f8e184..ce77d1a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "vban-cmd" -version = "2.4.7" +version = "2.4.8" description = "Python interface for the VBAN RT Packet Service (Sendtext)" authors = ["onyx-and-iris "] license = "MIT" diff --git a/vban_cmd/vbancmd.py b/vban_cmd/vbancmd.py index e74deee..7522fb3 100644 --- a/vban_cmd/vbancmd.py +++ b/vban_cmd/vbancmd.py @@ -184,10 +184,16 @@ class VbanCmd(metaclass=ABCMeta): def target(key): match key.split("-"): - case ["strip" | "bus" | "button" as kls, index]: + case ["strip" | "bus" as kls, index] if index.isnumeric(): target = getattr(self, kls) - case ["vban", direction, index]: - target = getattr(self.vban, f"{direction.rstrip('stream')}stream") + case [ + "vban", + "in" | "instream" | "out" | "outstream" as direction, + index, + ] if index.isnumeric(): + target = getattr( + self.vban, f"{direction.removesuffix('stream')}stream" + ) case _: ERR_MSG = f"invalid config key '{key}'" self.logger.error(ERR_MSG)