forked from platypush/platypush
[media.mpv] Make player.wait_for_shutdown
call back-compatible.
Older versions of python-mpv don't support the timeout parameter.
This commit is contained in:
parent
2c05b7a225
commit
c96e83107e
1 changed files with 6 additions and 1 deletions
|
@ -257,7 +257,12 @@ class MediaMpvPlugin(MediaPlugin):
|
|||
|
||||
player.stop()
|
||||
player.quit(code=0)
|
||||
try:
|
||||
player.wait_for_shutdown(timeout=10)
|
||||
except TypeError:
|
||||
# Older versions of python-mpv don't support the timeout argument
|
||||
player.wait_for_shutdown()
|
||||
|
||||
player.terminate()
|
||||
self._player = None
|
||||
return self.status()
|
||||
|
|
Loading…
Reference in a new issue