From fe6fa86d3d0e16eaa1e0f2b003a8f21fd0af0233 Mon Sep 17 00:00:00 2001 From: "Mikhail Andreev (adw0rd)" Date: Sat, 1 Jun 2013 16:04:38 +0400 Subject: [PATCH] Bugfix: then torrent_content_hash is not exist --- .../templates/torrent_stream/button.html | 44 ++++++++++--------- .../templates/torrent_stream/player.html | 44 ++++++++++--------- 2 files changed, 46 insertions(+), 42 deletions(-) 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 %}