#import sickgear #from sickgear import common #from lib import exceptions_helper as exceptions ## #set global $title = 'Media Rename ' + $show_obj.name #set global $header = $show_obj.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($sickgear.PROG_DIR, 'gui/slick/interfaces/default/inc_top.tmpl') #if $varExists('header')

Media Rename $header

#else

$title

#end if
#if $has_art #end if
#if 1 == int($show_obj.air_by_date) and $sickgear.NAMING_CUSTOM_ABD: #set $type = 'Air-by-date' #set $pattern = $sickgear.NAMING_ABD_PATTERN #elif 1 == int($show_obj.sports) and $sickgear.NAMING_CUSTOM_SPORTS: #set $type = 'Sports' #set $pattern = $sickgear.NAMING_SPORTS_PATTERN #else #set $type = 'Single episode' #set $pattern = $sickgear.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_obj.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.related_ep_obj]) #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($sickgear.PROG_DIR, 'gui/slick/interfaces/default/inc_bottom.tmpl')