index.mako 29 KB
Newer Older
echel0n's avatar
echel0n committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<%inherit file="../layouts/main.mako"/>
<%!
    import re
    import calendar

    import sickrage
    from sickrage.core.helpers import srdatetime, pretty_filesize, get_size
    from sickrage.core.updaters import tz_updater
    from sickrage.core.media.util import showImage
%>
<%block name="metas">
    <meta data-var="max_download_count" data-content="${max_download_count}">
</%block>
<%block name="content">
    <%namespace file="../includes/quality_defaults.mako" import="renderQualityPill"/>
echel0n's avatar
echel0n committed
16
    <div class="row sickrage-submenu mb-3">
17
        <div class="col text-left">
18
            <div class="form-inline m-2">
19
                % if sickrage.app.config.home_layout == 'poster':
20
                    <div class="px-1">
echel0n's avatar
echel0n committed
21
22
                        <select id="postersort" class="form-control bg-secondary text-white-50"
                                style="border: none;">
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
                            <option value="name"
                                    data-sort="${srWebRoot}/setPosterSortBy/?sort=name" ${('', 'selected')[sickrage.app.config.poster_sortby == 'name']}>
                                ${_('Name')}
                            </option>
                            <option value="date"
                                    data-sort="${srWebRoot}/setPosterSortBy/?sort=date" ${('', 'selected')[sickrage.app.config.poster_sortby == 'date']}>
                                ${_('Next Episode')}
                            </option>
                            <option value="network"
                                    data-sort="${srWebRoot}/setPosterSortBy/?sort=network" ${('', 'selected')[sickrage.app.config.poster_sortby == 'network']}>
                                ${_('Network')}
                            </option>
                            <option value="progress"
                                    data-sort="${srWebRoot}/setPosterSortBy/?sort=progress" ${('', 'selected')[sickrage.app.config.poster_sortby == 'progress']}>
                                ${_('Progress')}
                            </option>
                        </select>
                    </div>
echel0n's avatar
echel0n committed
41

42
                    <div class="px-1">
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
                        <select id="postersortdirection" class="form-control bg-secondary text-white-50"
                                style="border: none;">
                            <option value="true"
                                    data-sort="${srWebRoot}/setPosterSortDir/?direction=1" ${('', 'selected')[sickrage.app.config.poster_sortdir == 1]}>
                                ${_('Asc')}
                            </option>
                            <option value="false"
                                    data-sort="${srWebRoot}/setPosterSortDir/?direction=0" ${('', 'selected')[sickrage.app.config.poster_sortdir == 0]}>
                                ${_('Desc')}
                            </option>
                        </select>
                    </div>
                % endif
            </div>
        </div>
        <div class="col text-right">
59
            <div class="form-inline m-1 d-inline-flex">
60
                % if sickrage.app.config.home_layout == 'poster':
61
                    <div style="width: 100px" id="posterSizeSlider"></div>
62
                % endif
echel0n's avatar
echel0n committed
63
64
65
                <div class="dropdown ml-4">
                    <button type="button" class="btn bg-transparent dropdown-toggle" data-toggle="dropdown"
                            style="border: none;">
66
                        % if sickrage.app.config.home_layout == 'poster':
67
                            <i class="fas fa-2x fa-th-large"></i>
68
                        % elif sickrage.app.config.home_layout == 'small':
69
                            <i class="fas fa-2x fa-th"></i>
70
                        % elif sickrage.app.config.home_layout == 'banner':
71
                            <i class="fas fa-2x fa-image"></i>
72
                        % elif sickrage.app.config.home_layout == 'simple':
73
                            <i class="fas fa-2x fa-th-list"></i>
74
75
76
77
78
79
80
                        % endif
                    </button>
                    <div class="dropdown-menu dropdown-menu-right">
                        <a class="dropdown-item" href="${srWebRoot}/setHomeLayout/?layout=poster">Poster</a>
                        <a class="dropdown-item" href="${srWebRoot}/setHomeLayout/?layout=small">Small Poster</a>
                        <a class="dropdown-item" href="${srWebRoot}/setHomeLayout/?layout=banner">Banner</a>
                        <a class="dropdown-item" href="${srWebRoot}/setHomeLayout/?layout=simple">Simple</a>
81
82
                    </div>
                </div>
83
            </div>
echel0n's avatar
echel0n committed
84
85
86
        </div>
    </div>

87
    % for curListType, curShowlist in showlists.items():
echel0n's avatar
echel0n committed
88
        % if curListType == "Anime":
89
            <div class="row">
90
                <div class="col mx-auto">
echel0n's avatar
echel0n committed
91
                    <div class="h4 card" style="text-align: center;">${_('Anime List')}</div>
92
93
                </div>
            </div>
echel0n's avatar
echel0n committed
94
        % endif
95
        % if sickrage.app.config.home_layout == 'poster':
96
            <div class="loading-spinner text-center m-3">
97
98
                <i class="fas fa-10x fa-spinner fa-spin fa-fw"></i>
            </div>
99
            <div id="${('container', 'container-anime')[curListType == 'Anime' and sickrage.app.config.home_layout == 'poster']}"
100
                 class="show-grid mx-auto clearfix d-none">
echel0n's avatar
echel0n committed
101
                <div class="posterview">
102
                    % for curLoadingShow in sickrage.app.show_queue.loadingShowList:
echel0n's avatar
echel0n committed
103
104
105
                        % if not curLoadingShow.show:
                            <div class="show-container" data-name="0" data-date="010101" data-network="0"
                                 data-progress="101">
106
107
108
109
110
111
112
113
114
115
116
117
118
                                <div class="card card-block text-white bg-dark m-1 shadow">
                                    <img alt="" title="${curLoadingShow.show_name}" class="card-img-top"
                                         src="${srWebRoot}/images/poster.png"/>
                                    <div class="card-body text-truncate py-1 px-1 small">
                                        <div class="show-title">
                                            ${curLoadingShow.show_name}
                                        </div>
                                    </div>
                                    <div class="card-footer show-details p-1">
                                        <div class="show-details">
                                            <div class="show-add text-center">${_('... Loading ...')}</div>
                                        </div>
                                    </div>
echel0n's avatar
echel0n committed
119
120
121
122
123
                                </div>
                            </div>
                        % endif
                    % endfor

124
                    % for curShow in sorted(curShowlist, lambda x, y: cmp(x.name, y.name)):
echel0n's avatar
echel0n committed
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
                    <%
                        cur_airs_next = ''
                        cur_snatched = 0
                        cur_downloaded = 0
                        cur_total = 0
                        download_stat_tip = ''
                        display_status = curShow.status

                        if display_status:
                            if re.search(r'(?i)(?:new|returning)\s*series', curShow.status):
                                display_status = _('Continuing')
                            elif re.search(r'(?i)(?:nded)', curShow.status):
                                display_status = _('Ended')

                        if curShow.indexerid in show_stat:
                            cur_airs_next = show_stat[curShow.indexerid]['ep_airs_next']

                            cur_snatched = show_stat[curShow.indexerid]['ep_snatched']
                            if not cur_snatched:
                                cur_snatched = 0

                            cur_downloaded = show_stat[curShow.indexerid]['ep_downloaded']
                            if not cur_downloaded:
                                cur_downloaded = 0

                            cur_total = show_stat[curShow.indexerid]['ep_total']
                            if not cur_total:
                                cur_total = 0

                        if cur_total != 0:
                            download_stat = str(cur_downloaded)
                            download_stat_tip = _("Downloaded: ") + str(cur_downloaded)
                            if cur_snatched > 0:
                                download_stat = download_stat
                                download_stat_tip = download_stat_tip + "&#013;" + _("Snatched: ") + str(cur_snatched)

                            download_stat = download_stat + " / " + str(cur_total)
                            download_stat_tip = download_stat_tip + "&#013;" + _("Total: ") + str(cur_total)
                        else:
                            download_stat = '?'
                            download_stat_tip = _("no data")

                        nom = cur_downloaded
                        den = cur_total
                        if den == 0:
                            den = 1

                        progressbar_percent = nom * 100 / den

                        data_date = '6000000000.0'
                        if cur_airs_next:
echel0n's avatar
echel0n committed
176
                            data_date = calendar.timegm(srdatetime.srDateTime(tz_updater.parse_date_time(cur_airs_next, curShow.airs, curShow.network), convert=True).dt.timetuple())
echel0n's avatar
echel0n committed
177
178
179
180
181
182
183
                        elif display_status:
                            if 'nded' not in display_status and 1 == int(curShow.paused):
                                data_date = '5000000500.0'
                            elif 'ontinu' in display_status:
                                data_date = '5000000000.0'
                            elif 'nded' in display_status:
                                data_date = '5000000100.0'
184
185
186
187
188
189
190

                        network_class_name = None
                        if curShow.network:
                            network_class_name = re.sub(r'(?!\w|\s).', '', curShow.network)
                            network_class_name = re.sub(r'\s+', '-', network_class_name)
                            network_class_name = re.sub(r'^(\s*)([\W\w]*)(\b\s*$)', '\\2', network_class_name)
                            network_class_name = network_class_name.lower()
echel0n's avatar
echel0n committed
191
192
193
194
                    %>
                        <div class="show-container" id="show${curShow.indexerid}" data-name="${curShow.name}"
                             data-date="${data_date}" data-network="${curShow.network}"
                             data-progress="${progressbar_percent}">
echel0n's avatar
echel0n committed
195
                            <div class="card card-block text-white bg-dark m-1 shadow">
echel0n's avatar
echel0n committed
196
                                <a href="${srWebRoot}/home/displayShow?show=${curShow.indexerid}">
197
                                    <img alt="" class="card-img-top"
198
                                         src="${srWebRoot}${showImage(curShow.indexerid, 'poster').url}"/>
echel0n's avatar
echel0n committed
199
                                </a>
200
                                <div class="card-header py-0 px-0">
201
                                    <div class="bg-dark rounded">
echel0n's avatar
echel0n committed
202
                                        <div class="progress progress-bar rounded d-print-none" role="progressbar"
203
204
205
206
207
                                             style="width: ${progressbar_percent}%;height: 5px;"
                                             data-progress-percentage="${progressbar_percent}"
                                             data-show-id="${curShow.indexerid}">
                                        </div>
                                    </div>
echel0n's avatar
echel0n committed
208

209
210
211
212
213
                                </div>
                                <div class="card-body text-truncate py-1 px-1 small">
                                    <div class="show-title">
                                        ${curShow.name}
                                    </div>
echel0n's avatar
echel0n committed
214

215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
                                    <div class="show-date" style="color: grey">
                                        % if cur_airs_next:
                                            <% ldatetime = srdatetime.srDateTime(tz_updater.parse_date_time(cur_airs_next, curShow.airs, curShow.network), convert=True).dt %>
                                            <%
                                                try:
                                                  out = srdatetime.srDateTime(ldatetime).srfdate()
                                                except ValueError:
                                                  out = _('Invalid date')
                                            %>
                                        % else:
                                            <% display_status = curShow.status %>
                                            <%
                                                out = ''
                                                if display_status:
                                                  out = display_status
                                                  if 'nded' not in display_status and 1 == int(curShow.paused):
                                                      out = _('Paused')
                                            %>
                                        % endif
                                      ${out}
                                    </div>
                                </div>
237
238
239
240
                                <div class="card-footer show-details p-1">
                                    <table class="show-details text-center w-100">
                                        <tr>
                                            <td class="text-left">
241
                                                <span class="d-block small show-dlstats"
242
243
244
245
246
247
                                                      title="${download_stat_tip}">${download_stat}</span>
                                            </td>
                                            <td style="vertical-align: middle">
                                                % if sickrage.app.config.home_layout != 'simple':
                                                    % if curShow.network:
                                                        <span>
248
                                                            <i class="d-block mx-auto show-network-image sickrage-network sickrage-network-${network_class_name}"
249
250
251
252
                                                               title="${curShow.network}"></i>
                                                        </span>
                                                    % else:
                                                        <span>
253
                                                            <i class="d-block mx-auto show-network-image sickrage-network sickrage-network-no-network"
254
255
256
                                                               title="${_('No Network')}"></i>
                                                        </span>
                                                    % endif
echel0n's avatar
echel0n committed
257
                                                % else:
258
                                                    <span title="${curShow.network}">${curShow.network}</span>
echel0n's avatar
echel0n committed
259
                                                % endif
260
261
262
263
264
265
                                            </td>
                                            <td class="text-right">
                                                ${renderQualityPill(curShow.quality, showTitle=True)}
                                            </td>
                                        </tr>
                                    </table>
266
                                </div>
echel0n's avatar
echel0n committed
267
268
269
270
271
272
                            </div>
                        </div>
                    % endfor
                </div>
            </div>
        % else:
echel0n's avatar
echel0n committed
273
            <div class="table-responsive">
echel0n's avatar
echel0n committed
274
                <table id="showListTable${curListType}" class="table">
echel0n's avatar
echel0n committed
275
276
                    <thead>
                    <tr>
echel0n's avatar
echel0n committed
277
278
                        <th class="table-fit text-nowrap">${_('Next Ep')}</th>
                        <th class="table-fit text-nowrap">${_('Prev Ep')}</th>
279
                        <th class="${('', 'table-fit')[sickrage.app.config.home_layout in ['small', 'banner']]}">${_('Show')}</th>
echel0n's avatar
echel0n committed
280
                        <th class="table-fit text-nowrap">${_('Network')}</th>
echel0n's avatar
echel0n committed
281
                        <th class="table-fit">${_('Quality')}</th>
echel0n's avatar
echel0n committed
282
                        <th>${_('Downloads')}</th>
echel0n's avatar
echel0n committed
283
                        <th class="table-fit text-nowrap">${_('Size')}</th>
echel0n's avatar
echel0n committed
284
285
                        <th class="table-fit">${_('Active')}</th>
                        <th class="table-fit">${_('Status')}</th>
echel0n's avatar
echel0n committed
286
287
288
289
290
                    </tr>
                    </thead>

                    <tfoot>
                    <tr>
291
                        <th rowspan="1" colspan="1" align="center" class="text-nowrap">
292
293
294
                            <a href="${srWebRoot}/home/addShows/">
                                ${_('Add')} ${(_('Show'), _('Anime'))[curListType == 'Anime']}
                            </a>
echel0n's avatar
echel0n committed
295
296
297
298
299
300
301
302
303
304
305
306
                        </th>
                        <th>&nbsp;</th>
                        <th>&nbsp;</th>
                        <th>&nbsp;</th>
                        <th>&nbsp;</th>
                        <th>&nbsp;</th>
                        <th>&nbsp;</th>
                        <th>&nbsp;</th>
                        <th>&nbsp;</th>
                    </tr>
                    </tfoot>

307
                    % if sickrage.app.show_queue.loadingShowList:
echel0n's avatar
echel0n committed
308
                        <tbody>
309
                            % for curLoadingShow in sickrage.app.show_queue.loadingShowList:
310
                                % if not curLoadingShow.show or curLoadingShow.show not in sickrage.app.showlist:
echel0n's avatar
echel0n committed
311
312
313
314
315
                                    <tr>
                                        <td align="center">(${_('loading')})</td>
                                        <td></td>
                                        <td>
                                            % if curLoadingShow.show is None:
316
                                                <span title="">${_('Loading...')} ${curLoadingShow.show_name}</span>
echel0n's avatar
echel0n committed
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
                                            % else:
                                                <a data-fancybox
                                                   href="displayShow?show=${curLoadingShow.show.indexerid}">${curLoadingShow.show.name}</a>
                                            % endif
                                        </td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                        <td></td>
                                    </tr>
                                % endif
                            % endfor
                        </tbody>
                    % endif

333
                    <tbody class="">
334
                        % for curShow in sorted(curShowlist, lambda x, y: cmp(x.name, y.name)):
echel0n's avatar
echel0n committed
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
                            <%
                                cur_airs_next = ''
                                cur_airs_prev = ''
                                cur_snatched = 0
                                cur_downloaded = 0
                                cur_total = 0
                                show_size = 0
                                download_stat_tip = ''

                                if curShow.indexerid in show_stat:
                                    cur_airs_next = show_stat[curShow.indexerid]['ep_airs_next']
                                    cur_airs_prev = show_stat[curShow.indexerid]['ep_airs_prev']

                                    cur_snatched = show_stat[curShow.indexerid]['ep_snatched']
                                    if not cur_snatched:
                                        cur_snatched = 0

                                    cur_downloaded = show_stat[curShow.indexerid]['ep_downloaded']
                                    if not cur_downloaded:
                                        cur_downloaded = 0

                                    cur_total = show_stat[curShow.indexerid]['ep_total']
                                    if not cur_total:
                                        cur_total = 0

                                    show_size = get_size(curShow.location.encode('utf-8'))

                                if cur_total != 0:
                                    download_stat = str(cur_downloaded)
                                    download_stat_tip = _("Downloaded: ") + str(cur_downloaded)
                                    if cur_snatched > 0:
                                        download_stat = download_stat + "+" + str(cur_snatched)
                                        download_stat_tip = download_stat_tip + "&#013;" + _("Snatched: ") + str(cur_snatched)

                                    download_stat = download_stat + " / " + str(cur_total)
                                    download_stat_tip = download_stat_tip + "&#013;" + _("Total: ") + str(cur_total)
                                else:
                                    download_stat = '?'
                                    download_stat_tip = _("no data")

                                nom = cur_downloaded
                                den = cur_total
                                if den == 0:
                                    den = 1

                                progressbar_percent = nom * 100 / den
381
382
383
384
385
386
387

                                network_class_name = None
                                if curShow.network:
                                    network_class_name = re.sub(r'(?!\w|\s).', '', curShow.network)
                                    network_class_name = re.sub(r'\s+', '-', network_class_name)
                                    network_class_name = re.sub(r'^(\s*)([\W\w]*)(\b\s*$)', '\\2', network_class_name)
                                    network_class_name = network_class_name.lower()
echel0n's avatar
echel0n committed
388
389
390
                            %>
                            <tr>
                                % if cur_airs_next:
echel0n's avatar
echel0n committed
391
                                <% airDate = srdatetime.srDateTime(tz_updater.parse_date_time(cur_airs_next, curShow.airs, curShow.network), convert=True).dt %>
echel0n's avatar
echel0n committed
392
                                % try:
echel0n's avatar
echel0n committed
393
                                    <td class="align-middle text-center text-nowrap">
echel0n's avatar
echel0n committed
394
                                        <time datetime="${airDate.isoformat()}"
echel0n's avatar
echel0n committed
395
                                              class="date">${srdatetime.srDateTime(airDate).srfdate()}</time>
echel0n's avatar
echel0n committed
396
397
                                    </td>
                                % except ValueError:
echel0n's avatar
echel0n committed
398
                                    <td class="align-middle text-center text-nowrap"></td>
echel0n's avatar
echel0n committed
399
400
                                % endtry
                                % else:
echel0n's avatar
echel0n committed
401
                                    <td class="align-middle text-center text-nowrap"></td>
echel0n's avatar
echel0n committed
402
403
404
                                % endif

                                % if cur_airs_prev:
echel0n's avatar
echel0n committed
405
                                <% airDate = srdatetime.srDateTime(tz_updater.parse_date_time(cur_airs_prev, curShow.airs, curShow.network), convert=True).dt %>
echel0n's avatar
echel0n committed
406
                                % try:
echel0n's avatar
echel0n committed
407
                                    <td class="align-middle text-center text-nowrap">
408
409
410
                                        <time datetime="${airDate.isoformat()}" class="date">
                                            ${srdatetime.srDateTime(airDate).srfdate()}
                                        </time>
echel0n's avatar
echel0n committed
411
412
                                    </td>
                                % except ValueError:
echel0n's avatar
echel0n committed
413
                                    <td class="align-middle text-center text-nowrap"></td>
echel0n's avatar
echel0n committed
414
415
                                % endtry
                                % else:
echel0n's avatar
echel0n committed
416
                                    <td class="align-middle text-center text-nowrap"></td>
echel0n's avatar
echel0n committed
417
418
                                % endif

419
                                % if sickrage.app.config.home_layout == 'small':
420
                                    <td class="tvShow" align="center">
421
422
423
                                        <a href="${srWebRoot}/home/displayShow?show=${curShow.indexerid}"
                                           title="${curShow.name}">
                                            <img src="${srWebRoot}${showImage(curShow.indexerid, 'poster_thumb').url}"
424
                                                 class="rounded shadow img-fluid"
425
426
                                                 alt="${curShow.indexerid}"/>
                                        </a>
echel0n's avatar
echel0n committed
427
                                    </td>
428
                                % elif sickrage.app.config.home_layout == 'banner':
429
                                    <td class="align-middle text-center">
echel0n's avatar
echel0n committed
430
                                        <span style="display: none;">${curShow.name}</span>
431
432
                                        <a href="${srWebRoot}/home/displayShow?show=${curShow.indexerid}">
                                            <img src="${srWebRoot}${showImage(curShow.indexerid, 'banner').url}"
echel0n's avatar
echel0n committed
433
434
                                                 class="rounded shadow" alt="${curShow.indexerid}"
                                                 title="${curShow.name}"/>
435
                                        </a>
echel0n's avatar
echel0n committed
436
                                    </td>
437
                                % elif sickrage.app.config.home_layout == 'simple':
echel0n's avatar
echel0n committed
438
439
440
441
                                    <td class="tvShow">
                                        <a href="${srWebRoot}/home/displayShow?show=${curShow.indexerid}">
                                            ${curShow.name}
                                        </a>
echel0n's avatar
echel0n committed
442
443
444
                                    </td>
                                % endif

445
                                % if sickrage.app.config.home_layout != 'simple':
446
                                    <td class="align-middle text-center">
echel0n's avatar
echel0n committed
447
                                        % if curShow.network:
448
                                            <span>
echel0n's avatar
echel0n committed
449
450
                                                <i class="sickrage-network sickrage-network-${network_class_name}"
                                                   title="${curShow.network}"></i>
451
                                            </span>
452
                                            <span class="d-none d-print-inline">${curShow.network}</span>
echel0n's avatar
echel0n committed
453
                                        % else:
454
                                            <span>
echel0n's avatar
echel0n committed
455
456
                                                <i class="sickrage-network sickrage-network-no-network"
                                                   title="${_('No Network')}"></i>
457
                                            </span>
458
                                            <span class="d-none d-print-inline">No Network</span>
echel0n's avatar
echel0n committed
459
460
461
                                        % endif
                                    </td>
                                % else:
echel0n's avatar
echel0n committed
462
                                    <td class="text-nowrap">
echel0n's avatar
echel0n committed
463
464
465
466
                                        <span title="${curShow.network}">${curShow.network}</span>
                                    </td>
                                % endif

467
                                <td class="align-middle text-center">${renderQualityPill(curShow.quality, showTitle=True)}</td>
echel0n's avatar
echel0n committed
468

469
                                <td class="align-middle text-center">
echel0n's avatar
echel0n committed
470
                                    <span style="display: none;">${download_stat}</span>
echel0n's avatar
echel0n committed
471
                                    <div class="bg-dark rounded shadow">
472
                                        <div class="progress-bar rounded " style="width: ${progressbar_percent}%"
473
474
475
476
477
                                             data-show-id="${curShow.indexerid}"
                                             data-progress-percentage="${progressbar_percent}"
                                             data-progress-text="${download_stat}"
                                             data-progress-tip="${download_stat_tip}"></div>
                                    </div>
echel0n's avatar
echel0n committed
478
479
                                </td>

echel0n's avatar
echel0n committed
480
                                <td class="align-middle text-center text-nowrap" data-show-size="${show_size}">
481
482
                                    ${pretty_filesize(show_size)}
                                </td>
echel0n's avatar
echel0n committed
483

484
                                <td class="align-middle text-center ">
echel0n's avatar
echel0n committed
485
                                    <% paused = int(curShow.paused) == 0 and curShow.status == 'Continuing' %>
486
                                    <i class="fa ${("fa-times text-danger", "fa-check text-success")[bool(paused)]}"></i>
echel0n's avatar
echel0n committed
487
488
                                </td>

489
                                <td class="align-middle text-center">
echel0n's avatar
echel0n committed
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
                                    % if curShow.status and re.search(r'(?i)(?:new|returning)\s*series', curShow.status):
                                        ${_('Continuing')}
                                    % elif curShow.status and re.search('(?i)(?:nded)', curShow.status):
                                        ${_('Ended')}
                                    % else:
                                        ${curShow.status}
                                    % endif
                                </td>
                            </tr>
                        % endfor
                    </tbody>
                </table>
            </div>
        % endif
    % endfor
</%block>