From b8327cdf196212a0dcf79ba1c58ea98093887952 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sat, 8 Oct 2016 23:06:46 -0500 Subject: [PATCH] Add disable subs command --- resources/lib/websocket_client.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/resources/lib/websocket_client.py b/resources/lib/websocket_client.py index 84ed3a1e..1026e088 100644 --- a/resources/lib/websocket_client.py +++ b/resources/lib/websocket_client.py @@ -201,9 +201,12 @@ class WebSocketClient(threading.Thread): elif command == 'SetSubtitleStreamIndex': emby_index = int(arguments['Index']) current_file = player.getPlayingFile() - mapping = window('emby_%s.indexMapping' % current_file) - if mapping: + + if emby_index == -1: + player.showSubtitles(False) + + elif mapping: external_index = json.loads(mapping) # If there's external subtitles added via playbackutils for index in external_index: