Fix direct play & transcoding subtitles

- Finally fixes #66
This commit is contained in:
tomkat83 2016-09-08 13:59:21 +02:00
parent 47edacedca
commit 993350fa48
1 changed files with 6 additions and 5 deletions

View File

@ -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