Fix missing players when processing service items

bzr-revno: 2570
This commit is contained in:
Tim Bentley 2015-11-29 13:42:13 +00:00
commit 33a359d373
2 changed files with 14 additions and 3 deletions

View File

@ -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:
# 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 no player, we can't play
if not used_players:
return False
if controller.media_info.file_info.isFile():

View File

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