Browse Source

Host non-YouTube videos on a separate server

master
Niels G. W. Serup 10 months ago
parent
commit
99061ce7ec
Signed by: ngws GPG Key ID: 38EEEBCE67324F19
  1. 4
      scripts/generate-pages.py

4
scripts/generate-pages.py

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

Loading…
Cancel
Save