Small beautifications
This commit is contained in:
parent
df80c10799
commit
28b761627f
12
mpv.py
12
mpv.py
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue