From ce9a72e7567ccb2e178ae9a2e0ec4558a6483aaf Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Wed, 23 Jan 2019 12:28:14 -0600 Subject: [PATCH] Adjust subtitles behavior --- resources/lib/helper/playutils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/lib/helper/playutils.py b/resources/lib/helper/playutils.py index fd525d5f..9af3a72d 100644 --- a/resources/lib/helper/playutils.py +++ b/resources/lib/helper/playutils.py @@ -466,10 +466,10 @@ class PlayUtils(object): for stream in source['MediaStreams']: - if stream['Type'] == 'Subtitle' and stream['IsExternal'] and stream['IsTextSubtitleStream']: + if stream['Type'] == 'Subtitle' and stream['IsExternal']: index = stream['Index'] - if 'DeliveryUrl' in stream and stream['DeliveryUrl'].lower().startswith('http'): + if 'DeliveryUrl' in stream and stream['DeliveryUrl'].lower().startswith('/videos'): url = "%s/emby%s" % (self.info['ServerAddress'], stream['DeliveryUrl']) else: url = self.get_subtitles(source, stream, index) @@ -625,7 +625,7 @@ class PlayUtils(object): def get_subtitles(self, source, stream, index): - if 'DeliveryUrl' in stream and stream['DeliveryUrl'].lower().startswith('http'): + if stream['IsTextSubtitleStream'] and 'DeliveryUrl' in stream and stream['DeliveryUrl'].lower().startswith('/videos'): url = "%s/emby%s" % (self.info['ServerAddress'], stream['DeliveryUrl']) else: url = ("%s/emby/Videos/%s/%s/Subtitles/%s/Stream.%s?api_key=%s" %