mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-13 21:56:11 +00:00
do the action and on except set the default
This commit is contained in:
parent
6a079d8254
commit
706f903299
1 changed files with 12 additions and 13 deletions
|
@ -167,21 +167,20 @@ class Player(xbmc.Player):
|
||||||
except:
|
except:
|
||||||
tracks_data = None
|
tracks_data = None
|
||||||
|
|
||||||
if tracks_data is not None:
|
try: # Audio tracks
|
||||||
try: # Audio tracks
|
indexAudio = tracks_data['currentaudiostream']['index']
|
||||||
indexAudio = tracks_data['currentaudiostream']['index']
|
except:
|
||||||
except (KeyError, TypeError):
|
indexAudio = 0
|
||||||
indexAudio = 0
|
|
||||||
|
|
||||||
try: # Subtitles tracks
|
try: # Subtitles tracks
|
||||||
indexSubs = tracks_data['currentsubtitle']['index']
|
indexSubs = tracks_data['currentsubtitle']['index']
|
||||||
except (KeyError, TypeError):
|
except:
|
||||||
indexSubs = 0
|
indexSubs = 0
|
||||||
|
|
||||||
try: # If subtitles are enabled
|
try: # If subtitles are enabled
|
||||||
subsEnabled = tracks_data['subtitleenabled']
|
subsEnabled = tracks_data['subtitleenabled']
|
||||||
except (KeyError, TypeError):
|
except:
|
||||||
subsEnabled = ""
|
subsEnabled = ""
|
||||||
|
|
||||||
# Postdata for the audio
|
# Postdata for the audio
|
||||||
postdata['AudioStreamIndex'] = indexAudio + 1
|
postdata['AudioStreamIndex'] = indexAudio + 1
|
||||||
|
|
Loading…
Reference in a new issue