mirror of
https://github.com/onyx-and-iris/voicemeeter-api-python.git
synced 2026-04-06 23:43:30 +00:00
added support for setting bus mode through dict
bus modes added to all 3 example configs. config unit tests added
This commit is contained in:
@@ -27,9 +27,15 @@ class IRemote(metaclass=ABCMeta):
|
||||
pass
|
||||
|
||||
def apply(self, data: dict) -> Self:
|
||||
def fget(attr, val):
|
||||
if attr == "mode":
|
||||
return (getattr(self, attr), val, 1)
|
||||
return (self, attr, val)
|
||||
|
||||
for attr, val in data.items():
|
||||
if hasattr(self, attr):
|
||||
setattr(self, attr, val)
|
||||
target, attr, val = fget(attr, val)
|
||||
setattr(target, attr, val)
|
||||
return self
|
||||
|
||||
def then_wait(self):
|
||||
|
||||
Reference in New Issue
Block a user