summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2024-08-14 10:48:37 +0200
committerjaseg <git@jaseg.de>2024-08-14 10:48:37 +0200
commitef3f47c3ec8e276d4e25fd9ec2a7f06afd7df1ea (patch)
tree7a3272e470313ff04ffe37294101806f9b13d28a
parent775fc4a868fa8a84b6e1830a42cba4847a72e961 (diff)
downloadpython-mpv-ef3f47c3ec8e276d4e25fd9ec2a7f06afd7df1ea.tar.gz
python-mpv-ef3f47c3ec8e276d4e25fd9ec2a7f06afd7df1ea.tar.bz2
python-mpv-ef3f47c3ec8e276d4e25fd9ec2a7f06afd7df1ea.zip
Fix quit and quit_watch_later commands
-rw-r--r--mpv.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/mpv.py b/mpv.py
index 94eeb85..fa6666f 100644
--- a/mpv.py
+++ b/mpv.py
@@ -1375,11 +1375,17 @@ class MPV(object):
def quit(self, code=None):
"""Mapped mpv quit command, see man mpv(1)."""
- self.command('quit', code)
+ if code is not None:
+ self.command('quit', code)
+ else:
+ self.command('quit')
def quit_watch_later(self, code=None):
"""Mapped mpv quit_watch_later command, see man mpv(1)."""
- self.command('quit_watch_later', code)
+ if code is not None:
+ self.command('quit_watch_later', code)
+ else:
+ self.command('quit_watch_later')
def stop(self, keep_playlist=False):
"""Mapped mpv stop command, see man mpv(1)."""