2014-03-10 05:18:05 +00:00
|
|
|
#import sickbeard
|
|
|
|
#import datetime
|
|
|
|
#import re
|
|
|
|
#from sickbeard import providers
|
|
|
|
#from sickbeard.providers import generic
|
|
|
|
#from sickbeard.common import *
|
2015-05-07 00:36:40 +00:00
|
|
|
##
|
|
|
|
#set global $header = 'Failed Downloads'
|
|
|
|
#set global $title = 'Failed Downloads'
|
|
|
|
#set global $sbPath = '..'
|
|
|
|
#set global $topmenu = 'manage'
|
|
|
|
#set global $page_body_attr = 'failed'
|
|
|
|
##
|
|
|
|
#import os.path
|
|
|
|
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_top.tmpl')
|
2014-03-10 05:18:05 +00:00
|
|
|
|
2015-09-12 07:17:26 +00:00
|
|
|
<script type="text/javascript" src="$sbRoot/js/failedDownloads.js?v=$sbPID"></script>
|
2016-06-22 00:52:55 +00:00
|
|
|
<style>
|
|
|
|
.tablesorter .tablesorter-header{padding: 4px 18px 4px 5px}
|
|
|
|
</style>
|
2014-03-10 05:18:05 +00:00
|
|
|
|
2016-06-22 00:52:55 +00:00
|
|
|
#if $varExists('header')
|
2014-03-10 05:18:05 +00:00
|
|
|
<h1 class="header">$header</h1>
|
2016-06-22 00:52:55 +00:00
|
|
|
#else
|
2014-03-10 05:18:05 +00:00
|
|
|
<h1 class="title">$title</h1>
|
|
|
|
#end if
|
2015-05-07 00:36:40 +00:00
|
|
|
#set selected = ' selected="selected"'
|
2016-06-22 00:52:55 +00:00
|
|
|
<div class="h2footer pull-right"><b>Limit:</b>
|
|
|
|
<select id="limit" name="limit" class="form-control form-control-inline input-sm">
|
|
|
|
<option value="0"#if '0' == $limit then $selected else ''#>All</option>
|
|
|
|
<option value="100"#if '100' == $limit then $selected else ''#>100</option>
|
|
|
|
<option value="250"#if '250' == $limit then $selected else ''#>250</option>
|
|
|
|
<option value="500"#if '500' == $limit then $selected else ''#>500</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
2014-03-10 05:18:05 +00:00
|
|
|
|
2016-06-22 00:52:55 +00:00
|
|
|
<table id="failedTable" class="sickbeardTable tablesorter" border="0">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th style="width:1%">Order</th>
|
|
|
|
<th class="text-nowrap text-left" style="width:74%">Release</th>
|
|
|
|
<th style="width:10%">Size</th>
|
|
|
|
<th style="width:14%">Provider</th>
|
|
|
|
<th style="width:1%;padding: 4px 18px">Remove<br />
|
|
|
|
<input id="removeCheck" type="checkbox" class="bulkCheck">
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
2015-05-07 00:36:40 +00:00
|
|
|
|
2016-06-22 00:52:55 +00:00
|
|
|
#set $oldest = $len($failedResults)
|
|
|
|
<tfoot>
|
|
|
|
<tr>
|
|
|
|
<td colspan="4" class="text-left">
|
|
|
|
$oldest items shown#if $getVar('over_limit', False)#, more are available by changing the limit#end if#
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<input id="submitMassRemove" type="button" class="btn" value="Submit">
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tfoot>
|
2015-05-07 00:36:40 +00:00
|
|
|
|
2016-06-22 00:52:55 +00:00
|
|
|
<tbody>
|
|
|
|
#set $order = $oldest
|
|
|
|
#for $hItem in $failedResults[::-1]
|
|
|
|
#set $provider = $providers.getProviderClass($generic.GenericProvider.make_id($hItem['provider']))
|
|
|
|
#set $provider_name = None is not $provider and $provider.name or 'missing provider'
|
|
|
|
#set $provider_image = None is not $provider and $provider.image_name() or 'missing.png'
|
|
|
|
<tr>
|
|
|
|
<td data-order="$order">#echo 1 == $order and 'Newest' or $oldest == $order and 'Oldest' or '-'##set $order -= 1#</td>
|
|
|
|
<td class="text-nowrap text-left">#echo re.sub('"', '', $hItem['release'])#</td>
|
|
|
|
<td>#echo ($hItem['size'], '?')[-1 == $hItem['size']]#</td>
|
|
|
|
<td><img src="$sbRoot/images/providers/$provider_image" width="16" height="16" alt="$provider_name" title="$provider_name"></td>
|
|
|
|
<td data-order="0"><input type="checkbox" class="removeCheck" id="remove-#echo re.sub('"', '___', $hItem['release'])#"></td>
|
|
|
|
</tr>
|
2014-03-10 05:18:05 +00:00
|
|
|
#end for
|
2016-06-22 00:52:55 +00:00
|
|
|
</tbody>
|
|
|
|
</table>
|
2014-03-10 05:18:05 +00:00
|
|
|
|
2016-06-22 00:52:55 +00:00
|
|
|
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_bottom.tmpl')
|