diff --git a/torrent_stream/templates/torrent_stream/button.html b/torrent_stream/templates/torrent_stream/button.html index 7a8aff0..faaf17d 100644 --- a/torrent_stream/templates/torrent_stream/button.html +++ b/torrent_stream/templates/torrent_stream/button.html @@ -1,22 +1,24 @@ {% load i18n static %} -{% with 'torrent_stream_button_'|add:torrent_content_hash as transport_id %} - {% trans "Watch online" as watch_online_translated %} - - {{ watch_online_translated }} - {{ watch_online_translated }} - -
- - -{% endwith %} +{% if torrent_content_hash %} + {% with 'torrent_stream_button_'|add:torrent_content_hash as transport_id %} + {% trans "Watch online" as watch_online_translated %} + + {{ watch_online_translated }} + {{ watch_online_translated }} + +
+ + + {% endwith %} +{% endif %} diff --git a/torrent_stream/templates/torrent_stream/player.html b/torrent_stream/templates/torrent_stream/player.html index 596766d..adb5a1d 100644 --- a/torrent_stream/templates/torrent_stream/player.html +++ b/torrent_stream/templates/torrent_stream/player.html @@ -1,21 +1,23 @@ -{% with 'torrent_stream_transport_'|add:torrent_content_hash as transport_id %} -
- -{% endwith %} +{% if torrent_content_hash %} + {% with 'torrent_stream_transport_'|add:torrent_content_hash as transport_id %} +
+ + {% endwith %} +{% endif %}