#import re #import sickgear #from sickgear import TVInfoAPI, indexermapper, network_timezones #from sickgear.common import Overview, qualityPresets, qualityPresetStrings, \ Quality, statusStrings, WANTED, SKIPPED, ARCHIVED, IGNORED, FAILED, DOWNLOADED #from sickgear.helpers import anon_url, get_size, human, maybe_plural, generate_word_str #from sickgear.indexers.indexer_config import TVINFO_TVDB, TVINFO_IMDB #from six import iteritems <% def sg_var(varname, default=False): return getattr(sickgear, varname, default) %>#slurp# <% def sg_str(varname, default=''): return getattr(sickgear, varname, default) %>#slurp# ## #set global $title = getattr($show_obj, 'unique_name', $show_obj.name) #set global $topmenu = 'home' #set $exceptions_string = ', '.join($show_obj.exceptions) #set $css = $getVar('css', 'reg') #set $has_art = $getVar('has_art', None) #set $restart = 'Restart SickGear for new features on this page' #set $show_message = ($show_message, $restart)[None is $has_art] #set global $page_body_attr = 'display-show" class="' + $css #set theme_suffix = ('', '-dark')['dark' == $sg_str('THEME_NAME', 'dark')] ## #import os.path, os, re #set global $inc_top_glide = True #set global $inc_ofi = True #include $os.path.join($sg_str('PROG_DIR'), 'gui/slick/interfaces/default/inc_top.tmpl') #if $sg_var('USE_IMDB_INFO') #end if
#if $has_art #end if
Change show: #set $displayshowlist = [] #set $cur_sel = 0 #for $cur_showlist in $sortedShowLists #set $cur_showtype = $cur_showlist[0] #set $cur_showlist = $cur_showlist[1] #if 1 < len($sortedShowLists) #set void = $displayshowlist.append('\t\t\t' % $cur_showtype) #end if #for $cur_show_obj in $cur_showlist #set $show_ended = '' != $cur_show_obj.status and $cur_show_obj.status in ['ended', 'Ended', 'Canceled'] #set void = $displayshowlist.append('\t\t\t' % (('', 'class="ended" ')[$show_ended], $cur_show_obj.tvid_prodid, ('', ' selected="selected"')[$cur_show_obj == $show_obj], getattr($cur_show_obj, 'unique_name', $cur_show_obj.name))) #end for #if 1 < len($sortedShowLists) #set void = $displayshowlist.append('\t\t\t') #end if #end for ##
#if $show_message
$show_message
#end if
#if 0 < len($seasons) #set $show_ended = '' != $show_obj.status and $show_obj.status in ['ended', 'Ended', 'Canceled']
#if $getVar('has_special', 0 == $seasons[-1][0]) Specials #if $sg_var('DISPLAY_SHOW_SPECIALS')#View-#end if##echo ('Show', 'Hide')[$sg_var('DISPLAY_SHOW_SPECIALS')]# #end if
#set $many_seasons = 12 < len($seasons)
Season #set $season_list = [s[0] for s in $seasons] #if $many_seasons #else #for $number in $season_list #if 0 != $number $number #end if #end for #end if
#end if

$show_obj.name#echo ('', ' (ended)')[$show_ended]#

#set $genres_done = False #if $sg_var('USE_IMDB_INFO') and 'genres' in $show_obj.imdb_info and '' != $show_obj.imdb_info['genres'] #for $imdbgenre in $show_obj.imdb_info['genres'].split('|') #set $genres_done = True $imdbgenre.replace('Sci-Fi','Science-Fiction') #end for #end if #if not $genres_done and $show_obj.genre #for $genre in $show_obj.genre.split('|') #set $genres_done = True $genre #end for# #end if #if not $genres_done No genres #end if
#if int($show_obj.paused)
#end if
Links #set $tvdb_id = None #for $src_id, $src_name in iteritems($TVInfoAPI().all_sources) #if $TVInfoAPI($src_id).config.get('defunct') and $src_id != $show_obj.tvid #continue #end if #if $src_id in $show_obj.ids and $show_obj.ids[$src_id].get('id', 0) > 0 and $indexermapper.MapStatus.NOT_FOUND != $show_obj.ids[$src_id]['status'] #if $TVINFO_TVDB == $src_id #set $tvdb_id = $show_obj.ids[$src_id]['id'] #end if #if $TVINFO_IMDB == $src_id and not $sg_var('USE_IMDB_INFO') #continue #end if #if not $TVInfoAPI($src_id).config.get('defunct') #else# #end if# $src_name #end if #end for #if $has_art and $tvdb_id Fanart.tv #end if #if $xem_numbering or $xem_absolute_numbering [xem] #end if
#set $startyear, $flags, $runtime = (None, False, None) #if $sg_var('USE_IMDB_INFO') and $show_obj.imdbid #if 'year' in $show_obj.imdb_info #set $startyear = $show_obj.imdb_info['year'] or None #end if #set $flags = 'country_codes' in $show_obj.imdb_info and '' != $show_obj.imdb_info['country_codes'] #if 'runtimes' in $show_obj.imdb_info #set $runtime = $show_obj.imdb_info['runtimes'] or 0 #set $episode_count = $show_obj.imdb_info['episode_count'] or 0 ## test if average mini-series runtime is reasonable before using it, ## apply only to a runtime > 60 minutes, and assume 9.x minutes is the minimum (e.g. robot chicken) #if $show_obj.imdb_info['is_mini_series'] and 1 < $episode_count \ and $runtime and 90 < $runtime: #set $average_runtime = $runtime/$episode_count #if 9 < $average_runtime: #set $runtime = '%s (av %s?)' % ($runtime, int($average_runtime)) #end if #end if #end if #end if #if None is $startyear and $show_obj.startyear #set $startyear = $show_obj.startyear #end if #if None is $runtime and $show_obj.runtime #set $runtime = $show_obj.runtime #end if #if $startyear or $flags
Premiered #echo ($startyear, 'Unknown')[None is $startyear]# #if $flags #for $country in $show_obj.imdb_info['country_codes'].split('|') #end for #end if
#end if #if $show_obj.airs #set $showairs = '%s%s' % ($re.sub(r'(?:s|nes|rs|ur)?day', '', $re.sub(r'(y)[^\w]+', r'\1, ', $show_obj.airs)), ('', ' (invalid timeformat)')[not $network_timezones.test_timeformat($show_obj.airs)]) #set $showairs = $showairs.replace('Sat, Sun', 'Sat - Sun').replace('Mon, Tue, Wed, Thu, Fri', 'Mon - Fri').replace('Mon, Tue, Wed, Thu', 'Mon - Thu').replace('Tue, Wed, Thu', 'Tue - Thu')
Air#echo ('s', 'ed')[$show_ended]# $showairs
#end if #if $show_obj.network
Network $show_obj.network
#end if #if None is not $runtime
Runtime $runtime mins.
#end if #if $show_obj.status
Status $show_obj.status
#end if #if $sg_var('USE_IMDB_INFO') and 'rating' in $show_obj.imdb_info
IMDb rating #if $show_obj.imdb_info['votes'] #set $rating_tip = '%s of 10 stars
%s votes' % (str($show_obj.imdb_info['rating']), str($show_obj.imdb_info['votes'])) $show_obj.imdb_info['rating'] #else No votes available #end if
#end if #set $anyQualities, $bestQualities = $Quality.splitQuality(int($show_obj.quality)) #if $show_obj.quality in $qualityPresets
Quality $qualityPresetStrings[$show_obj.quality]
#else #if $anyQualities
Qualities #echo ', '.join([$Quality.get_quality_ui($x) for $x in sorted($anyQualities)])#
#end if #if $bestQualities
Upgrade to #echo ', '.join([$Quality.get_quality_ui($x) for $x in sorted($bestQualities)])#
#end if #end if
#set $has_overview = '' != $show_obj.overview #set $ep_tally = ('', '(%s episodes)' % $ep_counts['eps_all'])[0 < $ep_counts['eps_all']]
#set $cast_list = $show_obj.cast_list #if $cast_list <% def param(visible=True, rid=None, cache_person=None, cache_char=None, person=None, role=None, tvid_prodid=None, thumb=None, oid=None, pid=None): """ make the url param list """ if cache_char or role: oid = ('oid=%s' % oid, '')[not visible or None is oid or str(rid) == str(oid)] return ('imagecache/character?', '')[not cache_char] + '&'.join([kv for kv in ('rid=%s' % rid, 'tvid_prodid=%s' % (cache_char or role).tvid_prodid, ('', 'thumb=%s' % thumb)[not role and None is not thumb], ('person_id=%s' % pid, '')[not pid], ('prefer_person=1', '')[not pid], oid) if kv]) if cache_person: oid = ('oid=%s' % oid, '')[not visible or None is oid or str(rid) == str(oid)] return 'imagecache/person?' + '&'.join([kv for kv in ('pid=%s' % rid, ('', 'thumb=%s' % thumb)[None is not thumb], oid) if kv]) if person: oid = ('oid=%s' % person.id, '')[not visible or str(person.ref_id()) == str(person.id)] return '&'.join([kv for kv in ('rid=%s' % person.ref_id(), oid) if kv]) return 'param not implemented properly' %> #set $cast = {'1st': [], '2nd': []} #for $cur_cast in $cast_list #set $cast[('1st', '2nd')[not $cur_cast.name]] += [$cur_cast] #end for
    #for $cur_cast in $cast['1st'] + $cast['2nd'] #set $by_people = [] if not $cur_cast.person else [$cur_person.name for $cur_person in $cur_cast.person] #set $by_people = ', '.join($by_people if 2 > len($by_people) else $by_people[0:-1] + ['and ' + $by_people[-1]]) #set $caption = ' '.join(([] if not $cur_cast.name else [$cur_cast.name]) + ([] if not $by_people else ['by', $by_people])).replace('"', '"')
  • #end for


#else #end if $ep_tally #if $has_overview $show_obj.overview #else #echo ('', '

')[any($ep_tally)] #if $show_ended #if $varExists('force_update') A force full update may return a plot overview for this ended show #else Restart SickGear to get a new link here for this ended show #end if #else No plot overview available #end if #end if
$showLoc[0] $human($get_size($showLoc[0])) #set $filecount = sum([$c for $k, $c in $ep_counts['videos'].items()]) #set $to_prune = $show_obj.prune - $filecount #set $keep_or_prune = ('', ' (%s)' % ('%s to prune' % abs($to_prune), 'keep %s' % $show_obj.prune)[0 <= $to_prune])[bool($show_obj.prune)] #echo '%s file%s%s' % (('No', $filecount)[0 < $filecount], $maybe_plural($filecount), $keep_or_prune)# #if $show_obj.paused Paused #end if #if ($anyQualities + $bestQualities) and int($show_obj.upgrade_once) Upgrade once #end if #if $show_obj.exceptions Scene names #end if #if $show_obj.rls_ignore_words Ignored words #end if #if $show_obj.rls_require_words Required words #end if #if $show_obj.rls_global_exclude_ignore Excluded global ignored words #end if #if $show_obj.rls_global_exclude_require Excluded global required words #end if #if $show_obj.flatten_folders or $sg_var('NAMING_FORCE_FOLDERS') Flat folders #end if #if int($show_obj.air_by_date) Air by date #end if #if int($show_obj.dvdorder) DVD order #end if #if int($show_obj.scene) Scene numbering #end if #if $sg_var('USE_SUBTITLES') and int($show_obj.subtitles) Subtitles #end if #if int($show_obj.is_sports) Sports #end if #if int($show_obj.is_anime) Anime #end if #if $anigroups and $anigroups.allowlist Wanted group$maybe_plural(len($anigroups.allowlist)) #end if #if $anigroups and $anigroups.blocklist Unwanted group$maybe_plural(len($anigroups.blocklist)) #end if

Change selected episodes to

#if not len($seasons)

No episode details at TV info source $TVInfoAPI($show_obj.tvid).name

#else #set $working_season = -1 #set $odd = 0 #set $scene, $scene_anime = (False, False) #if not $show_obj.air_by_date and not $show_obj.is_sports and not $show_obj.is_anime and $show_obj.is_scene #set $scene = True #elif not $show_obj.air_by_date and not $show_obj.is_sports and $show_obj.is_anime and $show_obj.is_scene #set $scene_anime = True #end if #for $season, $episodes, $has_season_exceptions in $seasons #for $ep in $episodes #if None is not $ep #set $ep_str = '%sx%s' % ($season, $ep['episode']) #if $ep_str not in $ep_cats or (0 == $season and not $sg_var('DISPLAY_SHOW_SPECIALS')) #continue #end if #end if #if $working_season != $season #if 0 <= $working_season #end if #set $working_season = $season #set $human_season = ('Season %s' % $season, 'Specials')[0 == $season] #if $has_season_exceptions #set $human_season += '*' #end if ## one off variable migration, on next version apply... (s/$getVar('display_seasons', [])/[]/), #set $attr_title_ep = ('', ' (Anime #)')[$show_obj.is_anime] #if $scene or $scene_anime #end if# #if $sg_var('USE_SUBTITLES') and $show_obj.subtitles #end if #end if #if None is $ep #continue #end if #set global $episode = $ep #include $os.path.join($sg_str('PROG_DIR'), 'gui/slick/interfaces/default/inc_displayShow.tmpl') #end for #end for
#if None is $has_art#Restart SickGear to reveal new options here #elif not (1 == $lowest_season and 1 == $latest_season and $latest_season >= $highest_season) #end if #set $videos = $ep_counts['videos'].get($season, '0') #set $season_stats = $ep_counts['status'].get($season, {}) #set $snatched = $season_stats.get($Overview.SNATCHED, None) #set $wanted = $season_stats.get($Overview.WANTED, None) #set $qual = $season_stats.get($Overview.QUAL, None) #set $good = $season_stats.get($Overview.GOOD, '0') #set $archived = False if $season not in $ep_counts['archived'] else $ep_counts['archived'][$season]

$human_season #if None is not $has_art  D: $good #if snatched# S: $snatched #end if##if $wanted# W: $wanted #end if##if $qual# LQ: $qual #end if# of $ep_counts['totals'][$season]#if 0 < $archived# with $archived archived#end if##if int($videos)# #echo ('with', 'and')[0 < $archived]# $videos file$maybe_plural($videos)#end if# #end if

#Scene#if $scene_anime# absolute#end if#Name Air DateSubtitlesStatus Search
#end if
#if None is not $has_art #include $os.path.join($sg_str('PROG_DIR'), 'gui/slick/interfaces/default/inc_livepanel.tmpl') #end if #include $os.path.join($sg_str('PROG_DIR'), 'gui/slick/interfaces/default/inc_bottom.tmpl')