-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathhtml-downloaded.template
347 lines (282 loc) · 9.06 KB
/
html-downloaded.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
{% if task.accepted -%}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<style type="text/css">
body {
background: #000;
font-family: Tahoma;
}
div#main {
margin:0px auto 0px auto;
width:780px;
}
/* MOVIE */
div.header {
height: 57px;
}
div.name {
float: left;
}
div.ratings {
float: right;
}
div.photo {
border: 1px solid #000;
height: 120px;
width: 100px;
float: right;
background: #fff;
margin-left: 1em;
}
h2 {
margin: 0;
font-size: 0.9em;
color: #777;
}
/* SERIES */
div.series, div.movie, div.other {
border: 2px solid #FE7C32;
margin-bottom: 0.5em;
padding: 0.5em;
-moz-border-radius: 5px;
background: #fff;
}
div.series h1, div.movie h1, div.other h1 {
margin: 0;
}
div.series div.banner {
text-align:center;
}
div.series div.basic {
padding: 0.5em;
background: #E0E0E0;
}
div.season_ep {
float: right;
}
div.ep_name {
float: left;
font-weight: bold;
}
div.ep_rating {
float: left;
}
div.ep_director {
float: right;
}
div.details-button {
text-align: center;
}
div.actors, div.genres, div.overview {
background: #F7F7F7;
padding: 0.4em;
}
div.actors, div.genres, div.overview {
font-size: 0.9em;
}
div.actors h2, div.genres h2, div.overview h2
{
font-size: 1em;
margin-top: 0;
margin-bottom: 0.5em;
color: #366D9C;
}
div.overview p {
padding: 0;
margin: 0;
}
div.actors ul {
list-style: none; margin: 0; padding: 0;
}
div.actors ul li {
display: inline;
}
div.actors li:after {
content: ",";
}
div.actors li:last-child:after {
content: "";
}
div.genres ul {
list-style: none; margin: 0; padding: 0;
}
div.genres ul li {
display: inline;
}
div.genres li:after {
content: ",";
}
div.genres li:last-child:after {
content: "";
}
a {
color: #366D9C;
}
a:hover {
color: #f00;
}
div.clear {
clearing: both;
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>FlexGet</title>
</head>
<body>
<script type="text/javascript">
function toggle_visibility(c_id, id) {
var e = document.getElementById(id);
if(e.style.display == 'block')
e.style.display = 'none';
else
e.style.display = 'block';
var c = document.getElementById(c_id);
c.style.display = 'none';
}
</script>
<div id="main">
{% for entry in task.accepted %}
<!-- HANDLE SERIES -->
{% if entry.series_name is defined %}
<div class="series">
<h1>Episode has been set to download</h1>
<h2>{{ entry.series_name }} - S{{ entry.series_season }}E{{ entry.series_episode }}</h2>
{% if entry.tvdb_banner_url|d(false) %}
<div class="banner">
<br><img src="{{ entry.tvdb_banner_url }}" alt="{{ entry.series_name }}" title="{{ entry.series_name }}">
</div>
{% else %}
<h1>File has been set to download</h1>
<h2>{{ entry.title }}</h2>
{% endif %}
<div class="basic">
{% if entry.tvdb_ep_name is defined %}
<div class="ep_name">{{ entry.tvdb_ep_name }}</div>
{% endif %}
{% if entry.series_episode is defined and entry.series_season is defined %}
<div class="season_ep">
Season: {{ entry.series_season }} Episode: {{ entry.series_episode }}
</div>
{% endif %}
<div class="clear"> </div>
{% if entry.tvdb_ep_rating|d(false) %}
<div class="ep_rating">Rating: {{entry.tvdb_ep_rating}}</div>
{% endif %}
{% if entry.tvdb_status is defined %}
<!--
<div class="tvdb_status">Status: {{ entry.tvdb_status }}</div>
-->
{% endif %}
{% if entry.tvdb_ep_director is defined %}
<div class="ep_director">Director: {{ entry.tvdb_ep_director }}</div>
{% endif %}
<div class="clear"> </div>
</div>
{% if entry.tvdb_ep_overview|d(false) %}
<div class="overview">
<h2>Overview</h2>
<p>{{ entry.tvdb_ep_overview }}</p>
</div>
{% endif %}
<div id="info-{{ loop.index }}" style="display: none;">
<!-- a hack to keep browser from reseting position to top when clicking the Details link -->
<a name="a-{{ loop.index }}" style="display:none;"> </a>
{% if entry.tvdb_genres is defined and entry.tvdb_genres is iterable %}
<div class="genres">
<h2>Genres</h2>
<ul>
{% for genre in entry.tvdb_genres %}
<li>{{ genre }}</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if entry.series_actors is defined and entry.series_actors is iterable %}
<div class="actors">
<h2>Actors</h2>
<ul>
{% for actor in entry.series_actors %}
<li>{{ actor }}</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if entry.tvdb_ep_guest_stars is defined and entry.tvdb_ep_guest_stars is iterable %}
<div class="actors">
<h2>Guest stars</h2>
<ul>
{% for actor in entry.tvdb_ep_guest_stars %}
<li>{{ actor }}</li>
{% endfor %}
</ul>
</div>
{% endif %}
</div>
</div>
<!-- HANDLE MOVIES -->
{% elif entry.imdb_url is defined %}
<div class="movie">
<div class="header">
<div class="name">
{% if entry.imdb_name is defined and entry.imdb_year is defined%}
<h1>Movie has been set to download</h1>
<h2>{{ entry.imdb_name }} ({{ entry.imdb_year }})</h2>
<br><img src="{{ entry.imdb_photo }}" alt="{{ entry.imdb_name }}" title="{{ entry.imdb_name }}">
{% else %}
<h1>File has been set to download</h1>
<h2>{{ entry.title }}</h2>
{% endif %}
</div>
<div class="ratings">
{% if entry.imdb_score is defined %}
<div class="score">
Score: {{ entry.imdb_score }}
</div>
{% endif %}
{% if entry.imdb_votes is defined %}
<div class="votes">
Votes: {{ entry.imdb_votes }}
</div>
{% endif %}
</div>
<div class="clear"> </div>
</div>
{% if entry.imdb_plot_outline is defined %}
<div class="overview">
<h2>Plot</h2>
{{ entry.imdb_plot_outline }}
</div>
{% endif %}
{% if entry.imdb_genres is defined and entry.imdb_genres is iterable %}
<div class="genres">
<h2>Genres</h2>
<ul>
{% for genre in entry.imdb_genres %}
<li>{{ genre }}</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if entry.imdb_actors is defined and entry.imdb_actors is iterable %}
<div class="actors">
<h2>Actors</h2>
<ul>
{% for imdbid, actor in entry.imdb_actors.items() %}
<li><a href="http://www.imdb.com/name/{{ imdbid }}">{{ actor }}</a></li>
{% endfor %}
</ul>
</div>
{% endif %}
</div>
{% else %}
<div class="other">
<h1>File has been set to download</h1>
<h2>{{ entry.title }}</h2>
</div>
{% endif %}
{% endfor %}
</div>
</body>
</html>
{% endif %}