fix 500 error

master
Aevann 2024-04-06 09:53:38 +02:00
parent 10e5e0c841
commit dc9be397aa
1 changed files with 4 additions and 3 deletions

View File

@ -107,6 +107,7 @@ video_sub_regex = re.compile(f'(?<!")(https:\/\/({hosts})\/[\w:~,()\-.#&\/=?@%;+
def video_sub_regex_matcher(match):
url = match.group(1)
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>'