Merge pull request #455 from mcarlton00/subtitles-extra-slash

Remove extra slash from subtitle URLs
This commit is contained in:
Odd Stråbø 2020-12-26 20:42:33 +01:00 committed by GitHub
commit d59c4fc18a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -688,7 +688,7 @@ class PlayUtils(object):
def get_subtitles(self, source, stream, index): def get_subtitles(self, source, stream, index):
if stream['IsTextSubtitleStream'] and 'DeliveryUrl' in stream and stream['DeliveryUrl'].lower().startswith('/videos'): if stream['IsTextSubtitleStream'] and 'DeliveryUrl' in stream and stream['DeliveryUrl'].lower().startswith('/videos'):
url = "%s/%s" % (self.info['ServerAddress'], stream['DeliveryUrl']) url = "%s%s" % (self.info['ServerAddress'], stream['DeliveryUrl'])
else: else:
url = "%s/Videos/%s/%s/Subtitles/%s/Stream.%s?api_key=%s" % ( url = "%s/Videos/%s/%s/Subtitles/%s/Stream.%s?api_key=%s" % (
self.info['ServerAddress'], self.info['ServerAddress'],