#import sickbeard #from sickbeard import common #from sickbeard import exceptions ## #set global $title = 'Test Rename ' + $show.name #set global $header = '%s' % ($show.indexerid, $show.name) #set global $sbPath = '..' #set global $topmenu = 'home' #set global $page_body_attr = 'rename' ## #import os.path #include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_top.tmpl') #if $varExists('header')

$header

#else

$title

#end if

Preview of the proposed name changes

#if int($show.air_by_date) == 1 and $sickbeard.NAMING_CUSTOM_ABD: $sickbeard.NAMING_ABD_PATTERN #elif int($show.sports) == 1 and $sickbeard.NAMING_CUSTOM_SPORTS: $sickbeard.NAMING_SPORTS_PATTERN #else $sickbeard.NAMING_PATTERN #end if
## #set $curSeason = -1 #set $odd = False
Cancel Rename ## #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: #set $curSeason = int($cur_ep_obj.season) #end if ## #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 1 < len($epList) #set $epList = [$min($epList), $max($epList)] #end if #if $curLoc != $newLoc #else #end if #end for

#if 0 == int($cur_ep_obj.season) then 'Specials' else 'Season %s' % $cur_ep_obj.season#

Episode Old Location New Location
<%= '-'.join(map(str, epList)) %> $curLoc $newLoc
Cancel Rename
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_bottom.tmpl')