mirror of
https://github.com/onyx-and-iris/voicemeeter-api-python.git
synced 2026-04-13 10:33:30 +00:00
add eq, comp, gate to apply examples.
This commit is contained in:
@@ -45,9 +45,11 @@ class IRemote(metaclass=ABCMeta):
|
||||
|
||||
for attr, val in data.items():
|
||||
if not isinstance(val, dict):
|
||||
if hasattr(self, attr):
|
||||
if attr in dir(self): # avoid calling getattr (with hasattr)
|
||||
target, attr, val = fget(attr, val)
|
||||
setattr(target, attr, val)
|
||||
else:
|
||||
self.logger.error(f"invalid attribute {attr} for {self}")
|
||||
else:
|
||||
target = getattr(self, attr)
|
||||
target.apply(val)
|
||||
|
||||
Reference in New Issue
Block a user