summaryrefslogtreecommitdiff
path: root/mpv.py
diff options
context:
space:
mode:
Diffstat (limited to 'mpv.py')
-rw-r--r--mpv.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mpv.py b/mpv.py
index 0fa43a2..3916462 100644
--- a/mpv.py
+++ b/mpv.py
@@ -620,7 +620,8 @@ ALL_PROPERTIES = {
def bindproperty(MPV, name, proptype, access):
def getter(self):
- return proptype(_ensure_encoding(_mpv_get_property_string(self.handle, name.encode())))
+ value = _ensure_encoding(_mpv_get_property_string(self.handle, name.encode()))
+ return proptype(value) if value is not None else value
def setter(self, value):
_mpv_set_property_string(self.handle, name.encode(), str(proptype(value)).encode())
def barf(*args):