From ef3f47c3ec8e276d4e25fd9ec2a7f06afd7df1ea Mon Sep 17 00:00:00 2001 From: jaseg Date: Wed, 14 Aug 2024 10:48:37 +0200 Subject: Fix quit and quit_watch_later commands --- mpv.py | 10 ++++++++-- 1 file 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).""" -- cgit