usenetbinary-newsreaderquickboxtraktkodistabletvshowsqnaptautullifanartsickbeardtvseriesplexswizzinembyseedboxtvdbnzbgetsubtitlewebui
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
2.8 KiB
81 lines
2.8 KiB
#import re
|
|
#import sickbeard
|
|
#from sickbeard.helpers import anon_url
|
|
<% def sg_var(varname, default=False): return getattr(sickbeard, varname, default) %>#slurp#
|
|
<% def sg_str(varname, default=''): return getattr(sickbeard, varname, default) %>#slurp#
|
|
#set $state_checked = ('', ' checked=checked')[any([sg_var('IMPORT_DEFAULT_CHECKED_SHOWS')])]
|
|
|
|
<table id="addRootDirTable" class="sickbeardTable tablesorter">
|
|
<thead>
|
|
<tr>
|
|
<th class="col-checkbox">
|
|
<input type="checkbox" id="checkAll"$state_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
|
|
#if $curDir['added_already'] and (None is $curDir.get('highlight') or not $kwargs.get('hash_dir'))
|
|
#continue
|
|
#end if
|
|
|
|
#set $indexer = 0
|
|
#if $curDir['existing_info'][1] and $sickbeard.TVInfoAPI($curDir['existing_info'][0]).config.get('active')
|
|
#set $indexer = $curDir['existing_info'][0]
|
|
#elif 0 < $sickbeard.TVINFO_DEFAULT
|
|
#set $indexer = $sickbeard.TVINFO_DEFAULT
|
|
#end if
|
|
|
|
#set $show_id = $curDir['dir']
|
|
#if $curDir['existing_info'][1]
|
|
#set $show_id = $show_id + '|' + $str($indexer) + ':' + $str($curDir['existing_info'][1]) + '|' + $str($curDir['existing_info'][2])
|
|
#set $indexer = $curDir['existing_info'][0]
|
|
#end if
|
|
|
|
<tr>
|
|
<td class="col-checkbox">
|
|
<input type="checkbox" id="$show_id" class="dirCheck"$state_checked>
|
|
</td>
|
|
<td>
|
|
<label for="$show_id">
|
|
#set $display_name = (re.sub(r'^((?:A(?!\s+to)n?)|The)\s(\w)', r'<span class="article">\1</span> \2', $curDir['name']), $curDir['name'])[$sickbeard.SORT_ARTICLE]
|
|
<span class="filepath#if $curDir['highlight']# red-text#end if#">$curDir['path']</span>$display_name
|
|
#if $curDir['highlight']
|
|
<br />^ <span class="red-text">... (cannot add, this location is in use)</span>
|
|
#end if
|
|
</label>
|
|
</td>
|
|
#if $curDir['existing_info'][2] and $indexer > 0
|
|
<td>
|
|
#if curDir['existing_info'][1]
|
|
<a href="<%= anon_url(sickbeard.TVInfoAPI(indexer).config['show_url'] % curDir['existing_info'][1]) %>" target="_new">$curDir['existing_info'][2]</a>
|
|
#else
|
|
$curDir['existing_info'][2]
|
|
#end if
|
|
</td>
|
|
#else
|
|
<td>?</td>
|
|
#end if
|
|
<td align="center">
|
|
<select name="indexer">
|
|
#for $curIndexer in $sickbeard.TVInfoAPI().sources.items()
|
|
#if $sickbeard.TVInfoAPI($curIndexer[0]).config.get('active')
|
|
<option value="$curIndexer[0]" #if $curIndexer[0] == $indexer then 'selected="selected"' else ''#>$curIndexer[1]</option>
|
|
#end if
|
|
#end for
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
#end for
|
|
</tbody>
|
|
</table>
|
|
|