Private GIT

Skip to content
Snippets Groups Projects
Commit 157acc32 authored by Alexis Tyler's avatar Alexis Tyler
Browse files

home_massAddTable mako

parent 8f89c7ec
Branches
Tags
No related merge requests found
#import os.path
#import urllib
#import sickbeard
#set global $title="Add Show"
#set global $header="Add Show"
#set global $sbPath="../.."
#set global $statpath="../.."#
#set global $topmenu="home"#
#import os.path
#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl")
#if $varExists('header')
<h1 class="header">$header</h1>
#else
<h1 class="title">$title</h1>
#end if
<div id="addShowPortal">
<a href="$sbRoot/home/addShows/newShow/" id="btnNewShow" class="btn btn-large">
<div class="button"><div class="icon-addnewshow"></div></div>
<div class="buttontext">
<h3>Add New Show</h3>
<p>For shows that you haven't downloaded yet, this option finds a show on theTVDB.com and TVRage.com, creates a directory for its episodes, and adds it to SickRage.</p>
</div>
</a>
<br/><br/>
#if $sickbeard.USE_TRAKT == True:
<a href="$sbRoot/home/addShows/trendingShows/" id="btnNewShow" class="btn btn-large">
<div class="button"><div class="icon-addtrendingshow"></div></div>
<div class="buttontext">
<h3>Add Trending Show</h3>
<p>For shows that you haven't downloaded yet, this option lets you choose from a list of current trending shows with ratings to add, creates a directory for its episodes, and adds it to SickRage.</p>
</div>
</a>
<br/><br/>
<a href="$sbRoot/home/addShows/recommendedShows/" id="btnNewShow" class="btn btn-large">
<div class="button"><div class="icon-addrecommendedshow"></div></div>
<div class="buttontext">
<h3>Add Recommended Shows</h3>
<p>For shows that you haven't downloaded yet, this option recommends shows to add based on your Trakt.tv show library, creates a directory for its episodes, and adds it to SickRage.</p>
</div>
</a>
<br/><br/>
#end if
<a href="$sbRoot/home/addShows/existingShows/" id="btnExistingShow" class="btn btn-large">
<div class="button"><div class="icon-addexistingshow"></div></div>
<div class="buttontext">
<h3>Add Existing Shows</h3>
<p>Use this option to add shows that already have a folder created on your hard drive. SickRage will scan your existing metadata/episodes and add the show accordingly.</p>
</div>
</a>
</div>
#include $os.path.join($sickbeard.PROG_DIR,"gui/slick/interfaces/default/inc_bottom.tmpl")
#import sickbeard
#from sickbeard.helpers import anon_url
% import sickbeard
% from sickbeard.helpers import anon_url
<table id="addRootDirTable" class="sickbeardTable tablesorter">
<thead><tr><th class="col-checkbox"><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>
<tbody>
#for $curDir in $dirList:
#if $curDir['added_already']:
#continue
#end if
% for curDir in dirList:
<%
if curDir['added_already']:
continue
endif
#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
#set $indexer = 0
#if $curDir['existing_info'][0]:
#set $indexer = $curDir['existing_info'][2]
#elif $sickbeard.INDEXER_DEFAULT > 0:
#set $indexer = $sickbeard.INDEXER_DEFAULT
#end if
show_id = curDir['dir']
if curDir['existing_info'][0]:
show_id = show_id + '|' + str(curDir['existing_info'][0]) + '|' + str(curDir['existing_info'][1])
indexer = curDir['existing_info'][2]
endif
indexer = 0
if curDir['existing_info'][0]:
indexer = curDir['existing_info'][2]
elif sickbeard.INDEXER_DEFAULT > 0:
indexer = sickbeard.INDEXER_DEFAULT
endif
%>
<tr>
<td class="col-checkbox"><input type="checkbox" id="$show_id" class="dirCheck" checked=checked></td>
<td><label for="$show_id">$curDir['display_dir']</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]) %>">$curDir['existing_info'][1]</a></td>
#else:
<td class="col-checkbox"><input type="checkbox" id="${show_id}" class="dirCheck" checked=checked></td>
<td><label for="${show_id}">${curDir['display_dir']}</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]) %>">${curDir['existing_info'][1]}</a></td>
% else:
<td>?</td>
#end if
% endif
<td align="center">
<select name="indexer">
#for $curIndexer in $sickbeard.indexerApi().indexers.items():
<option value="$curIndexer[0]" #if $curIndexer[0] == $indexer then "selected=\"selected\"" else "UNKNOWN"#>$curIndexer[1]</option>
#end for
% for curIndexer in sickbeard.indexerApi().indexers.items():
<option value="${curIndexer[0]}" #if $curIndexer[0] == $indexer then "selected=\"selected\"" else "UNKNOWN"#>${curIndexer[1]}</option>
% endfor
</select>
</td>
</tr>
#end for
</tbody>
% endfor
</tbody>
</table>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment