don't decode/encode subs
This commit is contained in:
parent
2202d76d3a
commit
04bac1f201
2 changed files with 4 additions and 2 deletions
|
@ -7,7 +7,9 @@ lang = '1080p'
|
||||||
start = ''
|
start = ''
|
||||||
lights = False
|
lights = False
|
||||||
font = 'Menlo'
|
font = 'Menlo'
|
||||||
|
# SimHei for chinese
|
||||||
font_size = 28
|
font_size = 28
|
||||||
|
# 30 for chinese
|
||||||
|
|
||||||
conf = os.path.expanduser('~/.config/cdosea.json')
|
conf = os.path.expanduser('~/.config/cdosea.json')
|
||||||
if os.path.exists(conf):
|
if os.path.exists(conf):
|
||||||
|
|
|
@ -26,8 +26,8 @@ def get_subtitle(url, name):
|
||||||
try:
|
try:
|
||||||
r = requests.get(url)
|
r = requests.get(url)
|
||||||
if r.status_code == 200:
|
if r.status_code == 200:
|
||||||
with open('%s.tmp' % name, 'w') as fd:
|
with open('%s.tmp' % name, 'wb') as fd:
|
||||||
fd.write(r.text)
|
fd.write(r.content)
|
||||||
shutil.move('%s.tmp' % name, name)
|
shutil.move('%s.tmp' % name, name)
|
||||||
else:
|
else:
|
||||||
print('%s failed (%s)' % (url, r.status_code))
|
print('%s failed (%s)' % (url, r.status_code))
|
||||||
|
|
Loading…
Reference in a new issue