Fix traceback in mediacontroller if a service item had a processor type of automatic

This commit is contained in:
Jonathan Springer 2015-12-07 16:34:10 -05:00
parent f241aa663d
commit ae4858e434
1 changed files with 4 additions and 4 deletions

View File

@ -514,7 +514,10 @@ 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()
used_players = get_media_players()[0]
# If no player, we can't play
if not used_players:
return False
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.
@ -522,9 +525,6 @@ class MediaController(RegistryMixin, OpenLPMixin, RegistryProperties):
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():
suffix = '*.%s' % controller.media_info.file_info.suffix().lower()
for title in used_players: