From 45b4cb428ab7c27be95423e41ce9d712b6aa239c Mon Sep 17 00:00:00 2001 From: venomousZealot Date: Mon, 26 Apr 2021 11:30:24 +0200 Subject: [PATCH] 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. --- jellyfin_kodi/helper/playutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jellyfin_kodi/helper/playutils.py b/jellyfin_kodi/helper/playutils.py index 7d917c7a..0877f33f 100644 --- a/jellyfin_kodi/helper/playutils.py +++ b/jellyfin_kodi/helper/playutils.py @@ -641,7 +641,7 @@ class PlayUtils(object): selection = list(audio_streams.keys()) 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 audio_selected = audio_streams[next(iter(audio_streams))] else: