forked from openlp/openlp
Fix traceback in mediacontroller if a service item had a processor type of automatic
This commit is contained in:
parent
f241aa663d
commit
ae4858e434
@ -514,7 +514,10 @@ class MediaController(RegistryMixin, OpenLPMixin, RegistryProperties):
|
|||||||
:param display: Which display to use
|
:param display: Which display to use
|
||||||
:param service_item: The ServiceItem containing the details to be played.
|
: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]
|
default_player = used_players[0]
|
||||||
if service_item.processor and service_item.processor != UiStrings().Automatic:
|
if service_item.processor and service_item.processor != UiStrings().Automatic:
|
||||||
# check to see if the player is usable else use the default one.
|
# 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
|
used_players = default_player
|
||||||
else:
|
else:
|
||||||
used_players = [service_item.processor.lower()]
|
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():
|
if controller.media_info.file_info.isFile():
|
||||||
suffix = '*.%s' % controller.media_info.file_info.suffix().lower()
|
suffix = '*.%s' % controller.media_info.file_info.suffix().lower()
|
||||||
for title in used_players:
|
for title in used_players:
|
||||||
|
Loading…
Reference in New Issue
Block a user