2014-03-10 01:18:05 -04:00
|
|
|
#import sickbeard
|
|
|
|
#from sickbeard.common import indexerStrings
|
|
|
|
|
|
|
|
#set $rowidx = 0
|
|
|
|
<table id="addRootDirTable" class="sickbeardTable tablesorter">
|
|
|
|
<thead><tr><th width="1%"><input type="checkbox" id="checkAll" checked=checked></th><th>Directory</th><th width="20%">Show Name (tvshow.nfo)<th width="20%">Indexer</td></tr></thead>
|
|
|
|
<tfoot>
|
|
|
|
<tr>
|
|
|
|
<th rowspan="1" colspan="3" align="left"><a href="#" style="padding-left: 10px;" class="showManage">Manage Directories</a></th>
|
|
|
|
</tr>
|
|
|
|
</tfoot>
|
|
|
|
<tbody>
|
|
|
|
#for $curDir in $dirList:
|
|
|
|
#if $curDir['added_already']:
|
|
|
|
#continue
|
|
|
|
#end if
|
|
|
|
|
|
|
|
#set $show_id = $curDir['dir']
|
|
|
|
#set $indexer = 'Tvdb'
|
|
|
|
#if $curDir['existing_info'][0]:
|
|
|
|
#set $show_id = $show_id + '|' + $str($curDir['existing_info'][0]) + '|' + str($curDir['existing_info'][1])
|
|
|
|
#set $indexer = $str($curDir['existing_info'][2])
|
|
|
|
#end if
|
|
|
|
|
|
|
|
#set $rowidx = $rowidx + 1
|
|
|
|
|
|
|
|
<tr id=$rowidx>
|
|
|
|
<td><input type="checkbox" id="$show_id" class="dirCheck" checked=checked></td>
|
|
|
|
<td><label for="$show_id">$curDir['display_dir']</label></td>
|
|
|
|
#if 'Tvdb' in $indexer
|
2014-03-10 22:32:02 -04:00
|
|
|
<td>#if $curDir['existing_info'][0] and $curDir['existing_info'][1] then '<a href="http://thetvdb.com/?tab=series&id='+$str($curDir['existing_info'][0])+'">'+$curDir['existing_info'][1]+'</a>' else "?"#</td>
|
2014-03-10 01:18:05 -04:00
|
|
|
#elif 'TVRage' in $indexer
|
2014-03-10 22:32:02 -04:00
|
|
|
<td>#if $curDir['existing_info'][1] then '<a href="http://tvrage.com/'+$str($curDir['existing_info'][1])+'">'+$curDir['existing_info'][1]+'</a>' else "?"#</td>
|
2014-03-10 01:18:05 -04:00
|
|
|
#else
|
|
|
|
<td>$curDir['existing_info'][1]</td>
|
|
|
|
#end if
|
|
|
|
<td>
|
|
|
|
<select name="indexer">
|
|
|
|
#for $curIndexer in sorted($indexerStrings.items(), key=lambda x: x[1]):
|
|
|
|
<option value="$curIndexer[0]" #if $curIndexer[0] == $indexer then "selected=\"selected\"" else ""#>$curIndexer[1]</option>
|
|
|
|
#end for
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
#end for
|
|
|
|
</tbody>
|
|
|
|
</tbody>
|
|
|
|
</table>
|