#import sickbeard #from sickbeard import common #from sickbeard import exceptions ## #set global $title = 'Media Renamer ' + $show.name #set global $header = $show.name #set global $sbPath = '..' #set global $topmenu = 'home' #set $css = $getVar('css', 'reg') #set $has_art = $getVar('has_art', None) #set global $page_body_attr = 'edit-show" class="' + $css ## #import os.path #include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_top.tmpl') #if $varExists('header')

Media Renamer $header

#else

$title

#end if
#if $has_art #end if
#if 1 == int($show.air_by_date) and $sickbeard.NAMING_CUSTOM_ABD: #set $type = 'Air-by-date' #set $pattern = $sickbeard.NAMING_ABD_PATTERN #elif 1 == int($show.sports) and $sickbeard.NAMING_CUSTOM_SPORTS: #set $type = 'Sports' #set $pattern = $sickbeard.NAMING_SPORTS_PATTERN #else #set $type = 'Single episode' #set $pattern = $sickbeard.NAMING_PATTERN #end if

Proposed changes of existing files

$type sample:

$pattern edit pattern
#set $curSeason = -1 #set $first_season = True ## #for $cur_ep_obj in $ep_obj_list #if $curSeason != int($cur_ep_obj.season): #set $curSeason = int($cur_ep_obj.season) #if not $first_season #end if #set $first_season = False #end if ## #set $curLoc = $cur_ep_obj.location[len($cur_ep_obj.show.location) + 1:] #set $newLoc = '%s.%s' % ($cur_ep_obj.proper_path(), $curLoc.split('.')[-1]) #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 #set $epStr = '%sx%s' % ($cur_ep_obj.season, $cur_ep_obj.episode) #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
 #echo '-'.join(map(str, epList))# now: $curLoc.replace('/', '/ ').replace('\\', ' \\ ')
new: $newLoc.replace('/', '/ ').replace('\\', ' \\ ')
test: $cur_ep_obj.proper_path().replace('/', '/ ').replace('\\', ' \\ ')
Cancel Rename
Cancel Rename #include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_bottom.tmpl')