Fix impossibility of choosing the first subtitle

The usual combination of a zero-based index and a lazy if...

Also, there is no reason to use the default subtitles after asking users which subtitles they want.
This commit is contained in:
venomousZealot 2021-05-17 16:39:46 +02:00 committed by GitHub
parent b6cd28e39c
commit e907e35773
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -633,8 +633,8 @@ class PlayUtils(object):
selection = list(['No subtitles']) + list(map(get_track_title, subs_streams)) selection = list(['No subtitles']) + list(map(get_track_title, subs_streams))
resp = dialog("select", translate(33014), selection) - 1 resp = dialog("select", translate(33014), selection) - 1
if resp: if resp > -1:
index = subs_streams[resp] if resp > -1 else source.get('DefaultSubtitleStreamIndex') index = subs_streams[resp]
if index is not None: if index is not None: