From 377c963994fa74ab529413e91dc323da131aa52e Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 19 Feb 2019 11:12:57 +0100 Subject: [PATCH] Better to react only on mpv shutdown not end_of_file --- platypush/plugins/media/mpv.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/platypush/plugins/media/mpv.py b/platypush/plugins/media/mpv.py index 215c847a..929bdb36 100644 --- a/platypush/plugins/media/mpv.py +++ b/platypush/plugins/media/mpv.py @@ -87,14 +87,13 @@ class MediaMpvPlugin(MediaPlugin): bus.post(MediaPauseEvent(resource=self._get_current_resource())) elif evt == Event.UNPAUSE: 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) if playback_rebounced: playback_rebounce_event.clear() return - if evt == Event.SHUTDOWN: - self._player = None + self._player = None self._mpv_stopped_event.set() bus.post(MediaStopEvent()) return callback