2014-03-10 01:18:05 -04:00
|
|
|
#import sickbeard
|
|
|
|
#from sickbeard import common
|
|
|
|
#from sickbeard import exceptions
|
|
|
|
#set global $title="Test Rename"
|
2014-09-30 18:20:37 -04:00
|
|
|
#set global $header = '<a href="' + $sbRoot + '/home/displayShow?show=%d">%s</a>' % ($show.indexerid, $show.name)
|
2014-03-10 01:18:05 -04:00
|
|
|
#set global $sbPath=".."
|
|
|
|
|
|
|
|
#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
|
|
|
|
|
|
|
|
<input type="hidden" id="showID" value="$show.indexerid" />
|
|
|
|
|
|
|
|
<script type="text/javascript" src="$sbRoot/js/testRename.js"></script>
|
|
|
|
|
|
|
|
<h3>Preview of the proposed name changes</h3>
|
2014-09-30 18:20:37 -04:00
|
|
|
<blockquote style="margin-bottom: 0; color: #09A2FF;">
|
2014-03-10 01:18:05 -04:00
|
|
|
#if int($show.air_by_date) == 1 and $sickbeard.NAMING_CUSTOM_ABD:
|
|
|
|
$sickbeard.NAMING_ABD_PATTERN
|
2014-04-28 05:15:29 -04:00
|
|
|
#elif int($show.sports) == 1 and $sickbeard.NAMING_CUSTOM_SPORTS:
|
|
|
|
$sickbeard.NAMING_SPORTS_PATTERN
|
2014-03-10 01:18:05 -04:00
|
|
|
#else
|
|
|
|
$sickbeard.NAMING_PATTERN
|
|
|
|
#end if
|
|
|
|
</blockquote>
|
|
|
|
|
|
|
|
#set $curSeason = -1
|
|
|
|
#set $odd = False
|
|
|
|
<table id="testRenameTable" class="sickbeardTable" cellspacing="1" border="0" cellpadding="0">
|
|
|
|
|
|
|
|
#for $cur_ep_obj in $ep_obj_list:
|
|
|
|
#set $curLoc = $cur_ep_obj.location[len($cur_ep_obj.show.location)+1:]
|
|
|
|
#set $curExt = $curLoc.split('.')[-1]
|
|
|
|
#set $newLoc = $cur_ep_obj.proper_path() + '.' + $curExt
|
|
|
|
|
|
|
|
#if int($cur_ep_obj.season) != $curSeason:
|
|
|
|
<thead>
|
|
|
|
<tr class="seasonheader" id="season-$cur_ep_obj.season">
|
|
|
|
<td colspan="4">
|
|
|
|
<br/>
|
|
|
|
<h2>#if int($cur_ep_obj.season) == 0 then "Specials" else "Season "+str($cur_ep_obj.season)#</h2>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2014-09-30 18:20:37 -04:00
|
|
|
<tr class="seasoncols" id="season-$cur_ep_obj.season-cols">
|
|
|
|
<th width="1%" align="center"><input type="checkbox" class="seasonCheck" id="$cur_ep_obj.season" /></th>
|
2014-03-10 01:18:05 -04:00
|
|
|
<th class="nowrap">Episode</th>
|
|
|
|
<th class="nowrap">Old Location</th>
|
|
|
|
<th class="nowrap">New Location</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
#set $curSeason = int($cur_ep_obj.season)
|
|
|
|
#end if
|
|
|
|
<tbody>
|
|
|
|
#set $odd = not $odd
|
|
|
|
#set $epStr = str($cur_ep_obj.season) + "x" + str($cur_ep_obj.episode)
|
|
|
|
#set $epList = sorted([cur_ep_obj.episode] + [x.episode for x in cur_ep_obj.relatedEps])
|
|
|
|
#if len($epList) > 1:
|
|
|
|
#set $epList = [$min($epList), $max($epList)]
|
|
|
|
#end if
|
|
|
|
<tr class="season-$curSeason
|
|
|
|
#if $curLoc == $newLoc:
|
2014-10-04 08:47:24 -04:00
|
|
|
good
|
2014-03-10 01:18:05 -04:00
|
|
|
#else
|
|
|
|
wanted
|
|
|
|
#end if
|
2014-10-04 08:51:22 -04:00
|
|
|
seasonstyle">
|
2014-09-30 18:20:37 -04:00
|
|
|
<td width="1%" valign="top" align="center" class="tableleft">
|
2014-10-04 08:47:24 -04:00
|
|
|
#if $curLoc != $newLoc:
|
2014-03-10 01:18:05 -04:00
|
|
|
<input type="checkbox" class="epCheck" id="<%=str(cur_ep_obj.season) + 'x' + str(cur_ep_obj.episode)%>" name="<%=str(cur_ep_obj.season) + "x" + str(cur_ep_obj.episode) %>" />
|
2014-10-04 08:47:24 -04:00
|
|
|
#end if
|
2014-03-10 01:18:05 -04:00
|
|
|
</td>
|
|
|
|
<td align="center" valign="top" class="nowrap"><%= "-".join(map(str, epList)) %></td>
|
|
|
|
<td width="50%" valign="top">$curLoc</td>
|
2014-09-30 18:20:37 -04:00
|
|
|
<td width="50%" valign="top" class="tableright">$newLoc</td>
|
2014-03-10 01:18:05 -04:00
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
|
|
|
|
#end for
|
|
|
|
</table><br />
|
2014-10-04 08:47:24 -04:00
|
|
|
<input type="submit" value="Rename Selected" class="btn btn-success"> <a href="/home/displayShow?show=$show.indexerid" class='btn btn-danger' style="line-height: 20px !important;">Cancel Rename</a>
|
2014-03-10 01:18:05 -04:00
|
|
|
#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_bottom.tmpl")
|