From 0c2c869dbf8c91dc692635808ec7690308f2d572 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Tue, 8 Mar 2016 17:49:57 +0000 Subject: [PATCH] Fix more bugs --- openlp/core/ui/media/mediacontroller.py | 13 ++++++++----- openlp/core/ui/media/systemplayer.py | 3 --- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/openlp/core/ui/media/mediacontroller.py b/openlp/core/ui/media/mediacontroller.py index 25d12f3c7..b49fee87a 100644 --- a/openlp/core/ui/media/mediacontroller.py +++ b/openlp/core/ui/media/mediacontroller.py @@ -655,6 +655,8 @@ class MediaController(RegistryMixin, OpenLPMixin, RegistryProperties): controller.seek_slider.blockSignals(False) controller.volume_slider.blockSignals(False) controller.media_info.playing = True + display = self._define_display(controller) + display.setVisible(True) return True def tick(self, controller): @@ -696,11 +698,12 @@ class MediaController(RegistryMixin, OpenLPMixin, RegistryProperties): :param controller: The Controller to be paused """ display = self._define_display(controller) - self.current_media_players[controller.controller_type].pause(display) - controller.mediabar.actions['playbackPlay'].setVisible(True) - controller.mediabar.actions['playbackStop'].setDisabled(False) - controller.mediabar.actions['playbackPause'].setVisible(False) - controller.media_info.playing = False + if controller.controller_type in self.current_media_players: + self.current_media_players[controller.controller_type].pause(display) + controller.mediabar.actions['playbackPlay'].setVisible(True) + controller.mediabar.actions['playbackStop'].setDisabled(False) + controller.mediabar.actions['playbackPause'].setVisible(False) + controller.media_info.playing = False def media_loop_msg(self, msg): """ diff --git a/openlp/core/ui/media/systemplayer.py b/openlp/core/ui/media/systemplayer.py index ed00eead4..c8044b943 100644 --- a/openlp/core/ui/media/systemplayer.py +++ b/openlp/core/ui/media/systemplayer.py @@ -185,9 +185,6 @@ class SystemPlayer(MediaPlayer): :param display: The display where the media is """ - display.media_player.blockSignals(True) - display.media_player.durationChanged.disconnect() - display.media_player.blockSignals(False) display.media_player.stop() self.set_visible(display, False) self.set_state(MediaState.Stopped, display)