Fix embed page broken due to changes to jinja variables

Signed-off-by: Jesús <heckyel@hyperbola.info>
This commit is contained in:
James Taylor 2021-08-29 21:14:50 -07:00 committed by Jesús
parent 00c812ff4a
commit a7527986c8
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766
2 changed files with 6 additions and 4 deletions

View File

@ -120,5 +120,7 @@ const player = new Plyr(document.getElementById('js-video-player'), {
// Hide the external quality selector // Hide the external quality selector
window.addEventListener('DOMContentLoaded', function(){ window.addEventListener('DOMContentLoaded', function(){
document.getElementById('quality-select').hidden = true; var qs = document.getElementById('quality-select');
if (qs)
qs.hidden = true;
}); });

View File

@ -37,9 +37,9 @@
<body> <body>
<video id="js-video-player" controls autofocus onmouseleave="{{ title }}" <video id="js-video-player" controls autofocus onmouseleave="{{ title }}"
oncontextmenu="{{ title }}" onmouseenter="{{ title }}" title="{{ title }}"> oncontextmenu="{{ title }}" onmouseenter="{{ title }}" title="{{ title }}">
{% for video_source in video_sources %} {% if uni_sources %}
<source src="{{ video_source['src'] }}" type="{{ video_source['type'] }}"> <source src="{{ uni_sources[uni_idx]['url'] }}" type="{{ uni_sources[uni_idx]['type'] }}" data-res="{{ uni_sources[uni_idx]['quality'] }}">
{% endfor %} {% endif %}
{% for source in subtitle_sources %} {% for source in subtitle_sources %}
{% if source['on'] %} {% if source['on'] %}
<track label="{{ source['label'] }}" src="{{ source['url'] }}" kind="subtitles" srclang="{{ source['srclang'] }}" default> <track label="{{ source['label'] }}" src="{{ source['url'] }}" kind="subtitles" srclang="{{ source['srclang'] }}" default>