summaryrefslogtreecommitdiff
path: root/templates/index.html
diff options
context:
space:
mode:
authordavy <davy.wybiral@gmail.com>2019-06-28 17:51:38 -0500
committerdavy <davy.wybiral@gmail.com>2019-06-28 17:51:38 -0500
commit6e9f1ca8ab34914bcc2327e7d4fab99e6ff6e73c (patch)
tree57c8cd835fc0b5ef07cb4fc558dfcc2bf56c79b3 /templates/index.html
parentb46830c8806fc1293bc8cfdf5496cd024fcde6c4 (diff)
handle empty playlist
Diffstat (limited to 'templates/index.html')
-rw-r--r--templates/index.html4
1 files changed, 4 insertions, 0 deletions
diff --git a/templates/index.html b/templates/index.html
index 60b20bb..a63d4e9 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -11,10 +11,14 @@
<nav><a href="/">Tube</a></nav>
<main>
<div id="player">
+ {{ if $playing.ID }}
<video id="video" controls poster="/t/{{ $playing.ID}}" src="/v/{{ $playing.ID }}.mp4"></video>
<h1>{{ $playing.Title }}</h1>
<h2>{{ $playing.Modified }}</h2>
<p>{{ $playing.Description }}</p>
+ {{ else }}
+ <video id="video" controls></video>
+ {{ end }}
</div>
<div id="sidebar">
{{ range $m := .Playlist }}