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.stop()
|
||||||
player.quit(code=0)
|
player.quit(code=0)
|
||||||
|
try:
|
||||||
player.wait_for_shutdown(timeout=10)
|
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()
|
player.terminate()
|
||||||
self._player = None
|
self._player = None
|
||||||
return self.status()
|
return self.status()
|
||||||
|
|
Loading…
Reference in a new issue