Host non-YouTube videos on a separate server

This commit is contained in:
Niels G. W. Serup 2020-12-01 20:06:04 +01:00
parent 446ed2256a
commit 99061ce7ec
No known key found for this signature in database
GPG Key ID: 38EEEBCE67324F19
1 changed files with 1 additions and 3 deletions

View File

@ -44,8 +44,6 @@ def setup_directory_structure(settings, base_dir, template_dir):
site_new_dir = os.path.join(base_dir, 'site-new') site_new_dir = os.path.join(base_dir, 'site-new')
shutil.rmtree(site_new_dir, ignore_errors=True) shutil.rmtree(site_new_dir, ignore_errors=True)
os.mkdir(site_new_dir) os.mkdir(site_new_dir)
extern_dir_site = os.path.join(site_new_dir, 'extern')
os.symlink(os.path.join('..', 'extern'), extern_dir_site)
style = read(os.path.join(template_dir, 'style.css')) style = read(os.path.join(template_dir, 'style.css'))
style_out = style.replace('{', '{{').replace('}', '}}') \ style_out = style.replace('{', '{{').replace('}', '}}') \
@ -83,7 +81,7 @@ def generate_video_section_html(section_html, media):
return html_out return html_out
def extern_video(file_src): def extern_video(file_src):
url = '../extern/' + file_src url = 'https://f000.backblazeb2.com/file/media-metanohi-name/media/' + file_src
return '''\ return '''\
<video src="{url}" controls height="427"> <video src="{url}" controls height="427">
Your browser cannot play this video. You can download it here instead: Your browser cannot play this video. You can download it here instead: