openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #27898
[Merge] lp:~trb143/openlp/bug-1518634-22 into lp:openlp/2.2
Tim Bentley has proposed merging lp:~trb143/openlp/bug-1518634-22 into lp:openlp/2.2.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
Bug #1518634 in OpenLP: "Saved Service with Unavailable player crashes"
https://bugs.launchpad.net/openlp/+bug/1518634
For more details, see:
https://code.launchpad.net/~trb143/openlp/bug-1518634-22/+merge/278888
If saved player is not available revert to "Automatic" behaviour instead of crashing.
--
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/bug-1518634-22 into lp:openlp/2.2.
=== modified file 'openlp/core/ui/media/mediacontroller.py'
--- openlp/core/ui/media/mediacontroller.py 2015-06-15 20:29:34 +0000
+++ openlp/core/ui/media/mediacontroller.py 2015-11-28 15:42:03 +0000
@@ -514,10 +514,15 @@
:param display: Which display to use
:param service_item: The ServiceItem containing the details to be played.
"""
- used_players = get_media_players()[0]
+ used_players = get_media_players()
+ default_player = used_players[0]
if service_item.processor and service_item.processor != UiStrings().Automatic:
- used_players = [service_item.processor.lower()]
- # If no player, we can't play
+ # check to see if the player is usable else use the default one.
+ if not service_item.processor.lower() in used_players:
+ used_players = default_player
+ else:
+ used_players = [service_item.processor.lower()]
+
if not used_players:
return False
if controller.media_info.file_info.isFile():
=== modified file 'openlp/plugins/presentations/lib/messagelistener.py'
--- openlp/plugins/presentations/lib/messagelistener.py 2015-06-05 21:22:16 +0000
+++ openlp/plugins/presentations/lib/messagelistener.py 2015-11-28 15:42:03 +0000
@@ -346,6 +346,12 @@
self.handler = self.media_item.find_controller_by_type(file)
if not self.handler:
return
+ else:
+ # the saved handler is not present so need to use one based on file suffix.
+ if not self.controllers[self.handler].available:
+ self.handler = self.media_item.find_controller_by_type(file)
+ if not self.handler:
+ return
if is_live:
controller = self.live_handler
else:
Follow ups