Fix subs when local path is provided

This commit is contained in:
angelblue05 2018-04-02 05:06:29 -05:00
parent 59696da287
commit 6736223a86

View file

@ -325,9 +325,11 @@ class PlayUtils():
if stream['Type'] == "Subtitle" and stream['IsExternal'] and stream['IsTextSubtitleStream']: if stream['Type'] == "Subtitle" and stream['IsExternal'] and stream['IsTextSubtitleStream']:
index = stream['Index'] index = stream['Index']
url = self.server + stream['DeliveryUrl'] url = self.server + stream['DeliveryUrl'] if 'DeliveryUrl' in stream else stream.get('Path')
if url is None:
continue
if 'Language' in stream: if 'Language' in stream and 'DeliveryUrl' in stream:
filename = "Stream.%s.%s" % (stream['Language'].encode('utf-8'), stream['Codec']) filename = "Stream.%s.%s" % (stream['Language'].encode('utf-8'), stream['Codec'])
try: try:
subs.append(self._download_external_subs(url, temp, filename)) subs.append(self._download_external_subs(url, temp, filename))