handly empty subs
This commit is contained in:
parent
5e2b3cf448
commit
2bd1c7d657
1 changed files with 7 additions and 6 deletions
|
@ -105,12 +105,13 @@ def info(id, timeout=cache_timeout):
|
||||||
if not duration:
|
if not duration:
|
||||||
duration = '2'
|
duration = '2'
|
||||||
end = start + float(duration)
|
end = start + float(duration)
|
||||||
text = t.firstChild.data
|
if t.firstChild:
|
||||||
subs.append({
|
text = t.firstChild.data
|
||||||
'in': start,
|
subs.append({
|
||||||
'out': end,
|
'in': start,
|
||||||
'value': ox.decode_html(text),
|
'out': end,
|
||||||
})
|
'value': ox.decode_html(text),
|
||||||
|
})
|
||||||
info['subtitles'][language] = subs
|
info['subtitles'][language] = subs
|
||||||
return info
|
return info
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue