Better to react only on mpv shutdown not end_of_file
This commit is contained in:
parent
dcec3329d4
commit
377c963994
1 changed files with 2 additions and 3 deletions
|
@ -87,13 +87,12 @@ class MediaMpvPlugin(MediaPlugin):
|
||||||
bus.post(MediaPauseEvent(resource=self._get_current_resource()))
|
bus.post(MediaPauseEvent(resource=self._get_current_resource()))
|
||||||
elif evt == Event.UNPAUSE:
|
elif evt == Event.UNPAUSE:
|
||||||
bus.post(MediaPlayEvent(resource=self._get_current_resource()))
|
bus.post(MediaPlayEvent(resource=self._get_current_resource()))
|
||||||
elif evt == Event.END_FILE or evt == Event.SHUTDOWN:
|
elif evt == Event.SHUTDOWN:
|
||||||
playback_rebounced = playback_rebounce_event.wait(timeout=2)
|
playback_rebounced = playback_rebounce_event.wait(timeout=2)
|
||||||
if playback_rebounced:
|
if playback_rebounced:
|
||||||
playback_rebounce_event.clear()
|
playback_rebounce_event.clear()
|
||||||
return
|
return
|
||||||
|
|
||||||
if evt == Event.SHUTDOWN:
|
|
||||||
self._player = None
|
self._player = None
|
||||||
self._mpv_stopped_event.set()
|
self._mpv_stopped_event.set()
|
||||||
bus.post(MediaStopEvent())
|
bus.post(MediaStopEvent())
|
||||||
|
|
Loading…
Reference in a new issue