Restrict play links to videos from ytdl / youtube

- others sadly cannot be played by mpv
master
Felix Stupp 2 years ago
parent 4c9b1b0845
commit 6ec7da89a9
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -81,11 +81,14 @@
{% endmacro %}
{% macro as_play_link(element) -%}
{%- set opts = {
"video_uri": element.uri,
"start": element.progress,
} -%}
<a class="button" href="entertainment-decider:///player/play?{{ opts | encode_options }}">Play</a>
{# TODO do not hardcode certain extractors here #}
{% if element.extractor_name in ["ytdl", "youtube"] %}
{%- set opts = {
"video_uri": element.uri,
"start": element.progress,
} -%}
<a class="button" href="entertainment-decider:///player/play?{{ opts | encode_options }}">Play</a>
{% endif %}
{%- endmacro -%}
{% macro _navigation() %}

Loading…
Cancel
Save