Add API to set dict-valued properties
This commit is contained in:
parent
e1ae4f7da6
commit
f4086d4bb4
1 changed files with 4 additions and 1 deletions
5
mpv.py
5
mpv.py
|
|
@ -2064,7 +2064,10 @@ class MPV(object):
|
|||
def _set_property(self, name, value):
|
||||
self.check_core_alive()
|
||||
ename = name.encode('utf-8')
|
||||
if isinstance(value, (list, set, dict)):
|
||||
if isinstance(value, dict):
|
||||
_1, _2, _3, pointer = _make_node_str_map(value)
|
||||
_mpv_set_property(self.handle, ename, MpvFormat.NODE, pointer)
|
||||
elif isinstance(value, (list, set)):
|
||||
_1, _2, _3, pointer = _make_node_str_list(value)
|
||||
_mpv_set_property(self.handle, ename, MpvFormat.NODE, pointer)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue