Fix more bugs

This commit is contained in:
Tim Bentley 2016-03-08 17:49:57 +00:00
parent 4e39f71f4e
commit 0c2c869dbf
2 changed files with 8 additions and 8 deletions

View File

@ -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):
"""

View File

@ -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)