2016-02-14 12:28:30 +00:00
|
|
|
#import re
|
2014-03-10 05:18:05 +00:00
|
|
|
#import sickbeard
|
2014-11-09 02:49:38 +00:00
|
|
|
#from sickbeard.helpers import anon_url
|
2014-03-10 05:18:05 +00:00
|
|
|
|
|
|
|
<table id="addRootDirTable" class="sickbeardTable tablesorter">
|
2015-11-14 13:49:54 +00:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="col-checkbox">
|
|
|
|
<input type="checkbox" id="checkAll" checked=checked>
|
|
|
|
</th>
|
|
|
|
<th>Parent\show folder</th>
|
|
|
|
<th width="20%">Show name<br />(tvshow.nfo)</th>
|
|
|
|
<th width="15%">TV info source</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tfoot>
|
|
|
|
<tr>
|
|
|
|
<th rowspan="1" colspan="4" align="left">
|
|
|
|
<a href="#" class="showManage">Manage Directories</a>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
</tfoot>
|
|
|
|
<tbody>
|
|
|
|
#for $curDir in $dirList
|
2016-01-06 20:15:55 +00:00
|
|
|
#if $curDir['added_already'] and (None is $curDir.get('highlight') or not $kwargs.get('hash_dir'))
|
2015-11-14 13:49:54 +00:00
|
|
|
#continue
|
|
|
|
#end if
|
2014-03-10 05:18:05 +00:00
|
|
|
|
2015-11-14 13:49:54 +00:00
|
|
|
#set $show_id = $curDir['dir']
|
|
|
|
#if $curDir['existing_info'][0]
|
|
|
|
#set $show_id = $show_id + '|' + $str($curDir['existing_info'][0]) + '|' + $str($curDir['existing_info'][1])
|
|
|
|
#set $indexer = $curDir['existing_info'][2]
|
|
|
|
#end if
|
2014-03-10 05:18:05 +00:00
|
|
|
|
2015-12-16 23:35:39 +00:00
|
|
|
#set $indexer = $sickbeard.INDEXER_DEFAULT
|
|
|
|
|
|
|
|
#*
|
2015-11-14 13:49:54 +00:00
|
|
|
#set $indexer = 0
|
|
|
|
#if $curDir['existing_info'][0]
|
|
|
|
#set $indexer = $curDir['existing_info'][2]
|
|
|
|
#elif 0 < $sickbeard.INDEXER_DEFAULT
|
|
|
|
#set $indexer = $sickbeard.INDEXER_DEFAULT
|
|
|
|
#end if
|
2015-12-16 23:35:39 +00:00
|
|
|
*#
|
2015-11-14 13:49:54 +00:00
|
|
|
<tr>
|
|
|
|
<td class="col-checkbox">
|
|
|
|
<input type="checkbox" id="$show_id" class="dirCheck" checked=checked>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<label for="$show_id">
|
2016-02-14 12:28:30 +00:00
|
|
|
#set $display_name = (re.sub('^((?:A(?!\s+to)n?)|The)\s(\w)', r'<span class="article">\1</span> \2', $curDir['name']), $curDir['name'])[$sickbeard.SORT_ARTICLE]
|
|
|
|
<span class="filepath#echo ('', ' red-text')[$curDir['highlight']]#">$curDir['path']</span>$display_name
|
2015-11-14 13:49:54 +00:00
|
|
|
#echo ('', '<br />^ <span class="red-text">... (cannot add, this location is in use)</span>')[$curDir['highlight']]#
|
|
|
|
</label>
|
|
|
|
</td>
|
|
|
|
#if $curDir['existing_info'][1] and $indexer > 0
|
|
|
|
<td>
|
|
|
|
<a href="<%= anon_url(sickbeard.indexerApi(indexer).config['show_url'], curDir['existing_info'][0]) %>" target="_new">$curDir['existing_info'][1]</a>
|
|
|
|
</td>
|
|
|
|
#else
|
|
|
|
<td>?</td>
|
2014-03-10 05:18:05 +00:00
|
|
|
#end if
|
2015-11-14 13:49:54 +00:00
|
|
|
<td align="center">
|
|
|
|
<select name="indexer">
|
|
|
|
#for $curIndexer in $sickbeard.indexerApi().indexers.items()
|
2015-12-16 23:35:39 +00:00
|
|
|
#if $curIndexer[0] == $sickbeard.INDEXER_DEFAULT
|
2015-11-14 13:49:54 +00:00
|
|
|
<option value="$curIndexer[0]" #if $curIndexer[0] == $indexer then 'selected="selected"' else ''#>$curIndexer[1]</option>
|
2015-12-16 23:35:39 +00:00
|
|
|
#end if
|
2015-11-14 13:49:54 +00:00
|
|
|
#end for
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2014-03-10 05:18:05 +00:00
|
|
|
#end for
|
2015-11-14 13:49:54 +00:00
|
|
|
</tbody>
|
|
|
|
</table>
|