Restrict play links to videos from ytdl / youtube

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

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

Loading…
Cancel
Save