Fix transcoding of wrong audio channel

It's a zero based index, so if the first entry is not the default language, you can't ever select it.
Probably related to https://github.com/jellyfin/jellyfin-kodi/issues/265

PS: It's my first time messing with code on github. Sorry, if I didn't follow protocol correctly.
This commit is contained in:
venomousZealot 2021-04-26 11:30:24 +02:00 committed by GitHub
parent f9f1cccb97
commit 45b4cb428a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -641,7 +641,7 @@ class PlayUtils(object):
selection = list(audio_streams.keys()) selection = list(audio_streams.keys())
resp = dialog("select", translate(33013), selection) resp = dialog("select", translate(33013), selection)
audio_selected = audio_streams[selection[resp]] if resp else source['DefaultAudioStreamIndex'] audio_selected = audio_streams[selection[resp]] if resp > -1 else source['DefaultAudioStreamIndex']
else: # Only one choice else: # Only one choice
audio_selected = audio_streams[next(iter(audio_streams))] audio_selected = audio_streams[next(iter(audio_streams))]
else: else: