Fix subtitles not following server settings

This commit is contained in:
angelblue05 2018-11-09 18:13:08 -06:00
parent 702ce0beac
commit a1851069ed

View file

@ -171,15 +171,14 @@ class Player(xbmc.Player):
if audio and len(self.getAvailableAudioStreams()) > 1: if audio and len(self.getAvailableAudioStreams()) > 1:
self.setAudioStream(audio - 1) self.setAudioStream(audio - 1)
if subtitle is None: if subtitle == -1 or subtitle is None:
self.showSubtitles(False)
return return
tracks = len(self.getAvailableAudioStreams()) tracks = len(self.getAvailableAudioStreams())
if subtitle == -1 or subtitle is None: if mapping:
self.showSubtitles(False)
elif mapping:
for index in mapping: for index in mapping:
if mapping[index] == subtitle: if mapping[index] == subtitle:
@ -390,7 +389,6 @@ class Player(xbmc.Player):
for file in self.played: for file in self.played:
item = self.get_file_info(file) item = self.get_file_info(file)
if item:
window('emby.skip.%s.bool' % item['Id'], True) window('emby.skip.%s.bool' % item['Id'], True)
if window('emby.external.bool'): if window('emby.external.bool'):