From e6cc675207d641fa3c8c01b12292a07781f60ecf Mon Sep 17 00:00:00 2001 From: Martin Zibricky Date: Sat, 27 Oct 2012 19:04:54 +0200 Subject: [PATCH] Bug #963955: Fix the video progress bar. --- openlp/core/ui/media/mediacontroller.py | 11 ++++++++--- openlp/core/ui/media/vlcplayer.py | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/openlp/core/ui/media/mediacontroller.py b/openlp/core/ui/media/mediacontroller.py index e267c3a46..b0b7234a5 100644 --- a/openlp/core/ui/media/mediacontroller.py +++ b/openlp/core/ui/media/mediacontroller.py @@ -144,13 +144,18 @@ class MediaController(object): if not self.curDisplayMediaPlayer.keys(): self.timer.stop() else: + any_active = False for display in self.curDisplayMediaPlayer.keys(): self.curDisplayMediaPlayer[display].resize(display) self.curDisplayMediaPlayer[display].update_ui(display) if self.curDisplayMediaPlayer[display].state == \ - MediaState.Playing: - return - # no players are active anymore + MediaState.Playing: + any_active = True + # There are still any active players - no need to stop timer. + if any_active: + return + + # No players are active anymore. for display in self.curDisplayMediaPlayer.keys(): if self.curDisplayMediaPlayer[display].state != MediaState.Paused: display.controller.seekSlider.setSliderPosition(0) diff --git a/openlp/core/ui/media/vlcplayer.py b/openlp/core/ui/media/vlcplayer.py index c2a37144e..e851b61b8 100644 --- a/openlp/core/ui/media/vlcplayer.py +++ b/openlp/core/ui/media/vlcplayer.py @@ -230,6 +230,7 @@ class VlcPlayer(MediaPlayer): display.vlcWidget.setVisible(status) def update_ui(self, display): + # Stop video if playback is finished. if display.vlcMedia.get_state() == vlc.State.Ended: self.stop(display) controller = display.controller