From 30ea23aea082db21b215bc5c94494e6dc40bf421 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Wed, 2 Sep 2015 23:00:29 -0500 Subject: [PATCH] Fix for externalsubs - direct paths --- resources/lib/Player.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/resources/lib/Player.py b/resources/lib/Player.py index 9997f7d7..985a4f95 100644 --- a/resources/lib/Player.py +++ b/resources/lib/Player.py @@ -215,7 +215,12 @@ class Player( xbmc.Player ): if subsEnabled and len(xbmc.Player().getAvailableSubtitleStreams()) > 0: WINDOW = xbmcgui.Window(10000) mapping = WINDOW.getProperty("%sIndexMapping" % currentFile) - externalIndex = json.loads(mapping) + + if mapping: + externalIndex = json.loads(mapping) + else: # Direct paths scenario + externalIndex = "" + if externalIndex: # If there's external subtitles added via PlaybackUtils if externalIndex.get(str(indexSubs)): @@ -364,7 +369,12 @@ class Player( xbmc.Player ): postdata['AudioStreamIndex'] = indexAudio + 1 if subsEnabled and len(xbmc.Player().getAvailableSubtitleStreams()) > 0: - externalIndex = json.loads(mapping) + + if mapping: + externalIndex = json.loads(mapping) + else: # Direct paths scenario + externalIndex = "" + if externalIndex: # If there's external subtitles added via PlaybackUtils if externalIndex.get(str(indexSubs)):