check vban direction

check that index is numeric

remove button as possible key.
not defined in RT packets anyway

patch bump
This commit is contained in:
onyx-and-iris 2023-08-10 21:24:59 +01:00
parent f9bcbfa74a
commit 79260a0e47
4 changed files with 13 additions and 4 deletions

View File

@ -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},
}
)
```

View File

@ -37,6 +37,7 @@ def main():
{
"strip-2": {"A1": True, "B1": True, "gain": -6.0},
"bus-2": {"mute": True},
"vban-in-0": {"on": True},
}
)

View File

@ -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 <code@onyxandiris.online>"]
license = "MIT"

View File

@ -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)