Small beautifications
This commit is contained in:
parent
df80c10799
commit
28b761627f
1 changed files with 446 additions and 448 deletions
12
mpv.py
12
mpv.py
|
|
@ -229,10 +229,7 @@ _handle_func('mpv_get_wakeup_pipe', [], c_int)
|
||||||
|
|
||||||
class ynbool:
|
class ynbool:
|
||||||
def __init__(self, val=False):
|
def __init__(self, val=False):
|
||||||
if not val or val == b'no' or val == 'no':
|
self.val = bool(val and val not in (b'no', 'no'))
|
||||||
self.val = False
|
|
||||||
else:
|
|
||||||
self.val = True
|
|
||||||
|
|
||||||
def __nonzero__(self):
|
def __nonzero__(self):
|
||||||
return self.val
|
return self.val
|
||||||
|
|
@ -419,12 +416,13 @@ class MPV:
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def metadata(self):
|
def metadata(self):
|
||||||
...
|
raise NotImplementedError
|
||||||
|
|
||||||
def chapter_metadata(self):
|
def chapter_metadata(self):
|
||||||
...
|
raise NotImplementedError
|
||||||
|
|
||||||
def vf_metadata(self):
|
def vf_metadata(self):
|
||||||
...
|
raise NotImplementedError
|
||||||
|
|
||||||
# Convenience functions
|
# Convenience functions
|
||||||
def play(self, filename):
|
def play(self, filename):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue