Don't try to play media if no players are available. Fixes bug 1422761

Fixes: https://launchpad.net/bugs/1422761
This commit is contained in:
Tomas Groth 2015-02-18 21:32:42 +00:00
parent 6043d48d8f
commit 83ad7c31d7

View File

@ -517,6 +517,9 @@ class MediaController(RegistryMixin, OpenLPMixin, RegistryProperties):
used_players = get_media_players()[0] used_players = get_media_players()[0]
if service_item.processor != UiStrings().Automatic: if service_item.processor != UiStrings().Automatic:
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: