mirror of
https://github.com/onyx-and-iris/vban-cmd-python.git
synced 2026-04-06 23:53:31 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user