Skip to content

Commit ef3f47c

Browse files
author
jaseg
committed
Fix quit and quit_watch_later commands
1 parent 775fc4a commit ef3f47c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

mpv.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -1375,11 +1375,17 @@ def run(self, command, *args):
13751375

13761376
def quit(self, code=None):
13771377
"""Mapped mpv quit command, see man mpv(1)."""
1378-
self.command('quit', code)
1378+
if code is not None:
1379+
self.command('quit', code)
1380+
else:
1381+
self.command('quit')
13791382

13801383
def quit_watch_later(self, code=None):
13811384
"""Mapped mpv quit_watch_later command, see man mpv(1)."""
1382-
self.command('quit_watch_later', code)
1385+
if code is not None:
1386+
self.command('quit_watch_later', code)
1387+
else:
1388+
self.command('quit_watch_later')
13831389

13841390
def stop(self, keep_playlist=False):
13851391
"""Mapped mpv stop command, see man mpv(1)."""

0 commit comments

Comments
 (0)