diff --git a/openlp/core/ui/media/__init__.py b/openlp/core/ui/media/__init__.py index cb835ea7f..07e2a73fb 100644 --- a/openlp/core/ui/media/__init__.py +++ b/openlp/core/ui/media/__init__.py @@ -61,12 +61,12 @@ class MediaInfo(object): file_info = None volume = 100 is_background = False - loop_playback = False + can_loop_playback = False length = 0 start_time = 0 end_time = 0 title_track = 0 - playing = False + is_playing = False timer = 1000 audio_track = 0 subtitle_track = 0 diff --git a/openlp/core/ui/media/mediacontroller.py b/openlp/core/ui/media/mediacontroller.py index b49fee87a..cf116e861 100644 --- a/openlp/core/ui/media/mediacontroller.py +++ b/openlp/core/ui/media/mediacontroller.py @@ -215,7 +215,7 @@ class MediaController(RegistryMixin, OpenLPMixin, RegistryProperties): else: self.live_timer.stop() self.media_stop(self.display_controllers[DisplayControllerType.Live]) - if self.display_controllers[DisplayControllerType.Live].media_info.loop_playback: + if self.display_controllers[DisplayControllerType.Live].media_info.can_loop_playback: self.media_play(self.display_controllers[DisplayControllerType.Live], True) def media_state_preview(self): @@ -232,7 +232,7 @@ class MediaController(RegistryMixin, OpenLPMixin, RegistryProperties): else: self.preview_timer.stop() self.media_stop(self.display_controllers[DisplayControllerType.Preview]) - if self.display_controllers[DisplayControllerType.Preview].media_info.loop_playback: + if self.display_controllers[DisplayControllerType.Preview].media_info.can_loop_playback: self.media_play(self.display_controllers[DisplayControllerType.Preview], True) def get_media_display_css(self): @@ -394,7 +394,7 @@ class MediaController(RegistryMixin, OpenLPMixin, RegistryProperties): controller.media_info.volume = controller.volume_slider.value() controller.media_info.is_background = video_behind_text # background will always loop video. - controller.media_info.loop_playback = video_behind_text + controller.media_info.can_loop_playback = video_behind_text controller.media_info.file_info = QtCore.QFileInfo(service_item.get_frame_path()) display = self._define_display(controller) if controller.is_live: @@ -654,7 +654,7 @@ class MediaController(RegistryMixin, OpenLPMixin, RegistryProperties): self.preview_timer.start() controller.seek_slider.blockSignals(False) controller.volume_slider.blockSignals(False) - controller.media_info.playing = True + controller.media_info.is_playing = True display = self._define_display(controller) display.setVisible(True) return True @@ -666,10 +666,10 @@ class MediaController(RegistryMixin, OpenLPMixin, RegistryProperties): :param controller: The Controller to be processed """ start_again = False - if controller.media_info.playing and controller.media_info.length > 0: + if controller.media_info.is_playing and controller.media_info.length > 0: if controller.media_info.timer > controller.media_info.length: self.media_stop(controller, True) - if controller.media_info.loop_playback: + if controller.media_info.can_loop_playback: start_again = True controller.media_info.timer += TICK_TIME seconds = controller.media_info.timer // 1000 @@ -703,7 +703,7 @@ class MediaController(RegistryMixin, OpenLPMixin, RegistryProperties): controller.mediabar.actions['playbackPlay'].setVisible(True) controller.mediabar.actions['playbackStop'].setDisabled(False) controller.mediabar.actions['playbackPause'].setVisible(False) - controller.media_info.playing = False + controller.media_info.is_playing = False def media_loop_msg(self, msg): """ @@ -720,8 +720,8 @@ class MediaController(RegistryMixin, OpenLPMixin, RegistryProperties): :param controller: The controller that needs to be stopped """ - controller.media_info.loop_playback = not controller.media_info.loop_playback - controller.mediabar.actions['playbackLoop'].setChecked(controller.media_info.loop_playback) + controller.media_info.can_loop_playback = not controller.media_info.can_loop_playback + controller.mediabar.actions['playbackLoop'].setChecked(controller.media_info.can_loop_playback) def media_stop_msg(self, msg): """ @@ -748,7 +748,7 @@ class MediaController(RegistryMixin, OpenLPMixin, RegistryProperties): controller.mediabar.actions['playbackPlay'].setVisible(True) controller.mediabar.actions['playbackStop'].setDisabled(True) controller.mediabar.actions['playbackPause'].setVisible(False) - controller.media_info.playing = False + controller.media_info.is_playing = False controller.media_info.timer = 1000 controller.media_timer = 0 diff --git a/openlp/plugins/images/lib/mediaitem.py b/openlp/plugins/images/lib/mediaitem.py index f35fd48c7..80a49f81c 100644 --- a/openlp/plugins/images/lib/mediaitem.py +++ b/openlp/plugins/images/lib/mediaitem.py @@ -195,7 +195,7 @@ class ImageMediaItem(MediaManagerItem): Add custom buttons to the end of the toolbar """ self.replace_action = self.toolbar.add_toolbar_action('replace_action', - icon=':/slides/slide_blank.png', + icon=':/slides/slide_theme.png', triggers=self.on_replace_click) self.reset_action = self.toolbar.add_toolbar_action('reset_action', icon=':/system/system_close.png', diff --git a/openlp/plugins/media/lib/mediaitem.py b/openlp/plugins/media/lib/mediaitem.py index a8c6db35b..507196395 100644 --- a/openlp/plugins/media/lib/mediaitem.py +++ b/openlp/plugins/media/lib/mediaitem.py @@ -146,7 +146,7 @@ class MediaMediaItem(MediaManagerItem, RegistryProperties): Adds buttons to the end of the header bar. """ # Replace backgrounds do not work at present so remove functionality. - self.replace_action = self.toolbar.add_toolbar_action('replace_action', icon=':/slides/slide_blank.png', + self.replace_action = self.toolbar.add_toolbar_action('replace_action', icon=':/slides/slide_theme.png', triggers=self.on_replace_click) if 'webkit' not in get_media_players()[0]: self.replace_action.setDisabled(True) diff --git a/resources/images/general_preview.png b/resources/images/general_preview.png index d196792bb..2d6b7b631 100644 Binary files a/resources/images/general_preview.png and b/resources/images/general_preview.png differ diff --git a/tests/functional/openlp_plugins/media/test_mediaplugin.py b/tests/functional/openlp_plugins/media/test_mediaplugin.py index bdce3ad9f..87309afe8 100644 --- a/tests/functional/openlp_plugins/media/test_mediaplugin.py +++ b/tests/functional/openlp_plugins/media/test_mediaplugin.py @@ -54,7 +54,6 @@ class MediaPluginTest(TestCase, TestMixin): media_plugin.initialise() # THEN: The settings should be upgraded and the base initialise() method should be called - # mocked_settings.get_files_from_config.assert_called_with(media_plugin) mocked_settings.setValue.assert_called_with('media/media files', True) mocked_initialise.assert_called_with()