mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 12:16:12 +00:00
Fix external subtitles
This commit is contained in:
parent
dabdee9604
commit
1ca4ef48f5
1 changed files with 3 additions and 4 deletions
|
@ -276,7 +276,7 @@ class PlaybackUtils():
|
||||||
externalsubs.append(path)
|
externalsubs.append(path)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.error(e)
|
log.error(e)
|
||||||
continue
|
externalsubs.append(url)
|
||||||
else:
|
else:
|
||||||
externalsubs.append(url)
|
externalsubs.append(url)
|
||||||
|
|
||||||
|
@ -298,12 +298,11 @@ class PlaybackUtils():
|
||||||
|
|
||||||
try:
|
try:
|
||||||
response = requests.get(src, stream=True)
|
response = requests.get(src, stream=True)
|
||||||
response.encoding = 'utf-8'
|
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
except Exception as e:
|
except Exception:
|
||||||
del response
|
|
||||||
raise
|
raise
|
||||||
else:
|
else:
|
||||||
|
response.encoding = 'utf-8'
|
||||||
with open(path, 'wb') as f:
|
with open(path, 'wb') as f:
|
||||||
f.write(response.content)
|
f.write(response.content)
|
||||||
del response
|
del response
|
||||||
|
|
Loading…
Reference in a new issue