From ca8a39bc404397f5fe518d1376d2d1a15a0eba08 Mon Sep 17 00:00:00 2001 From: Stav88 Date: Sat, 1 Oct 2022 15:26:02 +0200 Subject: [PATCH] #240 fix a paused audio cue is not resumed but restarted if start-time has been set (#251) --- lisp/modules/gst_backend/gst_media.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/modules/gst_backend/gst_media.py b/lisp/modules/gst_backend/gst_media.py index a3aa7e594..0e356c15a 100644 --- a/lisp/modules/gst_backend/gst_media.py +++ b/lisp/modules/gst_backend/gst_media.py @@ -114,11 +114,13 @@ def play(self): for element in self._elements: element.play() + is_paused = self.state == MediaState.Paused + self._state = MediaState.Playing self._gst_pipe.set_state(Gst.State.PLAYING) self._gst_pipe.get_state(Gst.SECOND) - if self.start_time > 0 or self.stop_time > 0: + if (not is_paused) and (self.start_time > 0 or self.stop_time > 0): self.seek(self.start_time) self.played.emit(self)