forked from openlp/openlp
Fix missing players when processing service items
bzr-revno: 2570
This commit is contained in:
commit
33a359d373
@ -514,10 +514,15 @@ class MediaController(RegistryMixin, OpenLPMixin, RegistryProperties):
|
||||
: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():
|
||||
|
@ -346,6 +346,12 @@ class MessageListener(object):
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user