From bc81f9bed6f45fa67c629e14ffe1735464a2cd7c Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 19 Feb 2019 10:41:40 +0100 Subject: [PATCH] Only propagate MediaStopEvent on mpv shutdown, not end-of-file --- platypush/plugins/media/mpv.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platypush/plugins/media/mpv.py b/platypush/plugins/media/mpv.py index 0e9f4f8dc..234064bbd 100644 --- a/platypush/plugins/media/mpv.py +++ b/platypush/plugins/media/mpv.py @@ -84,9 +84,9 @@ 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: - if evt == Event.SHUTDOWN: - self._player = None + # elif evt == Event.END_FILE or evt == Event.SHUTDOWN: + elif evt == Event.SHUTDOWN: + self._player = None self._mpv_stopped_event.set() bus.post(MediaStopEvent()) return callback