From 993350fa48ee4104eff41d34f27d44d38c6893c8 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Thu, 8 Sep 2016 13:59:21 +0200 Subject: [PATCH] Fix direct play & transcoding subtitles - Finally fixes #66 --- resources/lib/playutils.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/resources/lib/playutils.py b/resources/lib/playutils.py index 16b763e8..6f9d74e7 100644 --- a/resources/lib/playutils.py +++ b/resources/lib/playutils.py @@ -363,11 +363,12 @@ class PlayUtils(): # Load subtitles in the listitem if downloadable if selectSubsIndex in downloadableStreams: - url = "%s/library/streams/%s" \ - % (self.server, selectSubsIndex) - url = self.API.addPlexHeadersToUrl(url) - log.info("Downloadable sub: %s: %s" % (selectSubsIndex, url)) - listitem.setSubtitles([tryEncode(url)]) + sub_url = self.API.addPlexHeadersToUrl( + "%s/library/streams/%s" + % (self.server, selectSubsIndex)) + log.info("Downloadable sub: %s: %s" + % (selectSubsIndex, sub_url)) + listitem.setSubtitles([tryEncode(sub_url)]) else: log.info('Need to burn in subtitle %s' % selectSubsIndex) playurlprefs["subtitleStreamID"] = selectSubsIndex