diff options
author | jaseg <git@jaseg.de> | 2022-04-22 23:18:48 +0200 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2022-04-22 23:18:48 +0200 |
commit | 85ad2a6aa6ef526db7b47c9e062f3460610e163d (patch) | |
tree | 638e32327eb09e3a39bf3a62500fd145e2c42c81 /mpv.py | |
parent | c90a5f692f255b9ee5bd51be65dc00a554ebf88e (diff) | |
download | python-mpv-85ad2a6aa6ef526db7b47c9e062f3460610e163d.tar.gz python-mpv-85ad2a6aa6ef526db7b47c9e062f3460610e163d.tar.bz2 python-mpv-85ad2a6aa6ef526db7b47c9e062f3460610e163d.zip |
Finish rewriting event infrastructure
Diffstat (limited to 'mpv.py')
-rw-r--r-- | mpv.py | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -415,7 +415,7 @@ class MpvEventProperty(Structure): @property def value(self): - return MpvNode.node_cast_value(self.data, self.format.value) + return MpvNode.node_cast_value(self.data, self.format.value, decoder=lazy_decoder) class MpvEventLogMessage(Structure): _fields_ = [('_prefix', c_char_p), @@ -432,7 +432,7 @@ class MpvEventLogMessage(Structure): @property def text(self): - return self._text + return lazy_decoder(self._text) class MpvEventEndFile(Structure): _fields_ = [('reason', c_int), @@ -459,9 +459,14 @@ class MpvEventClientMessage(Structure): class MpvEventCommand(Structure): _fields_ = [('_result', MpvNode)] - def result(self): + @property + def result_raw(self): return self._result.node_value() + @property + def result(self): + return self._result.node_value(decoder=lazy_decoder) + class MpvEventHook(Structure): _fields_ = [('_name', c_char_p), ('id', c_ulonglong),] |