do the action and on except set the default

This commit is contained in:
shaun 2017-01-14 11:38:00 +11:00
parent 6a079d8254
commit 706f903299

View file

@ -167,20 +167,19 @@ class Player(xbmc.Player):
except:
tracks_data = None
if tracks_data is not None:
try: # Audio tracks
indexAudio = tracks_data['currentaudiostream']['index']
except (KeyError, TypeError):
except:
indexAudio = 0
try: # Subtitles tracks
indexSubs = tracks_data['currentsubtitle']['index']
except (KeyError, TypeError):
except:
indexSubs = 0
try: # If subtitles are enabled
subsEnabled = tracks_data['subtitleenabled']
except (KeyError, TypeError):
except:
subsEnabled = ""
# Postdata for the audio