more automation

master
Aevann 2023-10-13 17:15:27 +03:00
parent 09b881c9f1
commit 4c015296d5
4 changed files with 4 additions and 3 deletions

View File

@ -71,7 +71,8 @@ def chat(v):
orgy = get_orgy(v) orgy = get_orgy(v)
if orgy: if orgy:
return render_template("orgy.html", v=v, messages=displayed_messages, orgy=orgy) x = secrets.token_urlsafe(8)
return render_template("orgy.html", v=v, messages=displayed_messages, orgy=orgy, x=x)
return render_template("chat.html", v=v, messages=displayed_messages) return render_template("chat.html", v=v, messages=displayed_messages)

View File

@ -24,10 +24,10 @@
<iframe src="https://player.twitch.tv/?channel={{orgy.data}}&parent={{SITE}}" frameborder="0" allowfullscreen></iframe> <iframe src="https://player.twitch.tv/?channel={{orgy.data}}&parent={{SITE}}" frameborder="0" allowfullscreen></iframe>
{% elif orgy.type == 'file' %} {% elif orgy.type == 'file' %}
<meta name="referrer" content="strict-origin-when-cross-origin"> <meta name="referrer" content="strict-origin-when-cross-origin">
<video id="orgy-file" data-created_utc="{{orgy.real_start_utc}}" controls preload="none" src="{{orgy.data}}"> <video id="orgy-file" data-created_utc="{{orgy.real_start_utc}}" controls preload="none" src="{{orgy.data}}?x={{x}}">
{% set subtitles_url = '/assets/' ~ orgy.data.split('/')[-1].split('.')[0] ~ '.vtt' %} {% set subtitles_url = '/assets/' ~ orgy.data.split('/')[-1].split('.')[0] ~ '.vtt' %}
{% if os_path.exists('files' ~ subtitles_url) %} {% if os_path.exists('files' ~ subtitles_url) %}
<track label="English" kind="subtitles" srclang="en" src="{{subtitles_url}}" default> <track label="English" kind="subtitles" srclang="en" src="{{subtitles_url}}?x={{x}}" default>
{% endif %} {% endif %}
</video> </video>
<video id="break-file" class="d-none" controls preload="none" src="/assets/break.mp4" data-run="0"></video> <video id="break-file" class="d-none" controls preload="none" src="/assets/break.mp4" data-run="0"></video>