Add disable subs command

This commit is contained in:
angelblue05 2016-10-08 23:06:46 -05:00
parent 634409c528
commit b8327cdf19

View file

@ -201,9 +201,12 @@ class WebSocketClient(threading.Thread):
elif command == 'SetSubtitleStreamIndex': elif command == 'SetSubtitleStreamIndex':
emby_index = int(arguments['Index']) emby_index = int(arguments['Index'])
current_file = player.getPlayingFile() current_file = player.getPlayingFile()
mapping = window('emby_%s.indexMapping' % current_file) mapping = window('emby_%s.indexMapping' % current_file)
if mapping:
if emby_index == -1:
player.showSubtitles(False)
elif mapping:
external_index = json.loads(mapping) external_index = json.loads(mapping)
# If there's external subtitles added via playbackutils # If there's external subtitles added via playbackutils
for index in external_index: for index in external_index: