Small beautifications

This commit is contained in:
jaseg 2015-05-10 17:55:06 +02:00
parent df80c10799
commit 28b761627f

12
mpv.py
View file

@ -229,10 +229,7 @@ _handle_func('mpv_get_wakeup_pipe', [], c_int)
class ynbool:
def __init__(self, val=False):
if not val or val == b'no' or val == 'no':
self.val = False
else:
self.val = True
self.val = bool(val and val not in (b'no', 'no'))
def __nonzero__(self):
return self.val
@ -419,12 +416,13 @@ class MPV:
@property
def metadata(self):
...
raise NotImplementedError
def chapter_metadata(self):
...
raise NotImplementedError
def vf_metadata(self):
...
raise NotImplementedError
# Convenience functions
def play(self, filename):