-
Notifications
You must be signed in to change notification settings - Fork 2
/
playlist.template
61 lines (51 loc) · 1.73 KB
/
playlist.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{% include "header.template" %}
<div>
<form action="/addMedia" method="POST">
Add URL:
<input type="reset" value="Clear">
<input type="text" name="media" size="50" placeholder="https://www.youtube.com/watch?v=">
<input type="submit" value="Submit">
</form>
</div>
<div>
<span class="playlist-empty"
{% if isObject(nowPlaying) %}
style="display: none;"
{% endif %}
>Playlist is empty. Why don't you add something?</span>
{% if isObject(nowPlaying) %}
<span id="nowplaying" class="nowplaying">Now playing: <a href="{{ nowPlaying.url }}">{{ nowPlaying.title }}</a> {{ nowPlaying.elapsed }} / {{ nowPlaying.lengthReadable }}
<form class="skip" action="/skip" method="POST">
<input type="hidden" id="media" name="media" value="{{ nowPlaying.mediaId }}">
<input type="submit" value="Skip">
</form>
Skips: {{ nowPlaying.skipCount }} / {{ nowPlaying.skipsNeeded }}</span>
{% else %}
<span class="nowplaying" style="display: none;" ></span>
{% endif %}
</div>
<div class="playlist">
<table>
<tr> <th>Id</th> <th>Title</th> <th>Status</th> <th>Start</th> <th>Duration</th> </tr>
## for media in playlist
<tr>
<td>{{ media.id }}</td>
{% if media.title == "" %}
<td><a href="{{ media.url }}">{{ media.url}}</a></td>
{% else %}
<td><a href="{{ media.url }}">{{ media.title}}</a></td>
{% endif %}
<td>{{ media.statusString }}</td>
<td>{{ media.startTimeReadable }}</td>
<td>{{ media.lengthReadable }}</td>
</tr>
## endfor
</table>
</div>
<div class="links">
<p>
<a href="/history">History</a>
<a href="/media">All media</a>
</p>
</div>
{% include "footer.template" %}