fix 500 error
parent
10e5e0c841
commit
dc9be397aa
|
@ -107,9 +107,10 @@ video_sub_regex = re.compile(f'(?<!")(https:\/\/({hosts})\/[\w:~,()\-.#&\/=?@%;+
|
|||
|
||||
def video_sub_regex_matcher(match):
|
||||
url = match.group(1)
|
||||
posterurl = g.posterurls.get(url)
|
||||
if posterurl:
|
||||
return f'<p class="resizable"><video poster="{posterurl}" controls preload="none" src="{url}"></video></p>'
|
||||
if hasattr(g, 'posterurls'):
|
||||
posterurl = g.posterurls.get(url)
|
||||
if posterurl:
|
||||
return f'<p class="resizable"><video poster="{posterurl}" controls preload="none" src="{url}"></video></p>'
|
||||
return f'<p class="resizable"><video controls preload="none" src="{url}"></video></p>'
|
||||
|
||||
audio_regex_extensions = '|'.join(AUDIO_FORMATS)
|
||||
|
|
Loading…
Reference in New Issue