forked from hjone72/Tautulli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
current_activity_header.html
38 lines (32 loc) · 1.15 KB
/
current_activity_header.html
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
<%doc>
USAGE DOCUMENTATION :: PLEASE LEAVE THIS AT THE TOP OF THIS FILE
For Mako templating syntax documentation please visit: http://docs.makotemplates.org/en/latest/
Filename: current_activity_header.html
Version: 0.1
Variable names: data [string]
data :: Usable parameters
data Returns the current number of active streams
DOCUMENTATION :: END
</%doc>
% if data != None:
<%
s = '('
if data['direct_play']:
s += str(data['direct_play']) + ' direct play' + ('s' if data['direct_play'] > 1 else '') + ', '
if data['direct_stream']:
s += str(data['direct_stream']) + ' direct stream' + ('s' if data['direct_stream'] > 1 else '') + ', '
if data['transcode']:
s += str(data['transcode']) + ' transcode' + ('s' if data['transcode'] > 1 else '') + ', '
s = s.rstrip(', ')
s += ')'
%>
% if data['stream_count'] == '0':
<h3>Activity</h3>
% elif data['stream_count'] == '1':
<h3>Activity <small>${data['stream_count']} stream ${s}</small></h3>
% else:
<h3>Activity <small>${data['stream_count']} streams ${s}</small></h3>
% endif
% else:
<h3>Activity</h3>
% endif