From 5bcdc85ce11a0fe857edd6e2f3586a60cb1f05ea Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Thu, 28 May 2015 22:38:43 +0200 Subject: [PATCH] Fix a left-over from the VLC 2.2 fix; fix a problem when video player from the UI is None --- openlp/core/ui/media/mediacontroller.py | 2 +- openlp/plugins/media/lib/mediaitem.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/openlp/core/ui/media/mediacontroller.py b/openlp/core/ui/media/mediacontroller.py index 158c44e71..39e7d3b65 100644 --- a/openlp/core/ui/media/mediacontroller.py +++ b/openlp/core/ui/media/mediacontroller.py @@ -515,7 +515,7 @@ class MediaController(RegistryMixin, OpenLPMixin, RegistryProperties): :param service_item: The ServiceItem containing the details to be played. """ used_players = get_media_players()[0] - if service_item.processor != UiStrings().Automatic: + if service_item.processor and service_item.processor != UiStrings().Automatic: used_players = [service_item.processor.lower()] # If no player, we can't play if not used_players: diff --git a/openlp/plugins/media/lib/mediaitem.py b/openlp/plugins/media/lib/mediaitem.py index f34e88926..f61d5c960 100644 --- a/openlp/plugins/media/lib/mediaitem.py +++ b/openlp/plugins/media/lib/mediaitem.py @@ -34,6 +34,7 @@ from openlp.core.ui import DisplayController, Display, DisplayControllerType from openlp.core.ui.media import get_media_players, set_media_players, parse_optical_path, format_milliseconds from openlp.core.utils import get_locale_key from openlp.core.ui.media.vlcplayer import get_vlc + if get_vlc() is not None: from openlp.plugins.media.forms.mediaclipselectorform import MediaClipSelectorForm @@ -412,7 +413,7 @@ class MediaMediaItem(MediaManagerItem, RegistryProperties): When the load optical button is clicked, open the clip selector window. """ # self.media_clip_selector_form.exec_() - if VLC_AVAILABLE: + if get_vlc(): media_clip_selector_form = MediaClipSelectorForm(self, self.main_window, None) media_clip_selector_form.exec_() del media_clip_selector_form