#import datetime #import re #import sickgear #from sickgear import TVInfoAPI #from sickgear.indexers.indexer_config import TVINFO_TMDB, TVINFO_TRAKT, TVINFO_TVMAZE #from sickgear.helpers import anon_url #from sickgear.tv import PersonGenders #from sg_helpers import spoken_height #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# ## #if $person.name #set global $title = $person.name + ' (Person)' #else #set global $title = 'Person' #end if #set global $header = 'Person' #set global $sbPath = '../..' #set global $topmenu = 'person' #set $css = $getVar('css', 'reg') #set global $page_body_attr = 'cast-person" class="' + $css ## #import os.path #set global $inc_ofi = True #include $os.path.join($sg_str('PROG_DIR'), 'gui/slick/interfaces/default/inc_top.tmpl') #if $varExists('header')

$header

#else

$title

#end if ## #set $html_selected = ' selected="selected"' #set $html_checked = ' checked="checked"' #set $age = $person.age <% 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' %>
#slurp #set $gender = '' #if $PersonGenders.female == $person.gender# #set $gender = '♀' #elif $PersonGenders.male == $person.gender# #set $gender = '♂' #end if##slurp

$person.name#if $age #($age)#end if##if $gender #$gender#end if##if $person.deathday # †#end if#

#set $section_header = False #set $current_date = $datetime.date.today() #set $rc_clean = re.compile(r'(?i)[^a-z0-9]') #set $max_width = ('', ' max-width')[2 < len($roles)] #for $cur_char in $roles #if $cur_char.get('show_obj') #if not $section_header #set $section_header = True
is known in your show list as,
#end if
#set $gender = 'themself' #if $PersonGenders.female == $person.gender# #set $gender = 'Herself' #elif $PersonGenders.male == $person.gender# #set $gender = 'Himself' #end if# #set $name = ($cur_char['character_name'], $gender)[$rc_clean.sub('', $cur_char['character_name'].lower()) == $rc_clean.sub('', $person.name.lower())] $name
#set $from_age = None if not $cur_char["start_year"] else $person.calc_age($datetime.date($cur_char["start_year"], 1, 1)) #set $to_age = None if not $cur_char["end_year"] else $person.calc_age($datetime.date($cur_char["end_year"], *((12, 31), ($current_date.month, $current_date.day))[$cur_char["end_year"] >= $current_date.year])) #if $from_age or $to_age
assumed age in role
#end if #if $from_age $from_age #end if #if $to_age #if $from_age - #end if $to_age #end if #if $from_age or $to_age years
#end if
#end if #end for #if $section_header ##
note: images differ for animated or multiple people cast into roles
#end if
#if $person.real_name
Real name$person.real_name
#end if #if $person.akas #set $akas = ' * '.join(['%s' % (('', ' class="grey-text"')[bool(idx % 2)], $aka) for (idx, $aka) in $enumerate($person.lang_ordered_akas)])
Akas$akas
#end if #if $person.nicknames
Nicknames#echo', '.join($person.lang_ordered_nicknames)#
#end if #if $person.height #set $inches = str(round(($person.height / float(2.54)), 1)).rstrip('.0')
Height$spoken_height($person.height) ... ($round($person.height, 1) cm, $inches inches)
#end if #if $person.birthday
Birthdate$sickgear.sgdatetime.SGDatetime.sbfdate($person.birthday)
#end if #if $person.birthplace
Birthplace$person.birthplace
#end if #if $person.deathday
Deathdate$sickgear.sgdatetime.SGDatetime.sbfdate($person.deathday)
#end if #if $person.deathplace
Deathplace$person.deathplace
#end if #set $section_links = False #set $all_sources = $TVInfoAPI().all_sources #for $cur_src, $cur_sid in sorted(iteritems($person.ids)) #if $cur_src not in $all_sources: #continue #end if #if $TVInfoAPI($cur_src).config.get('people_url') #if not $section_links #set $section_links = True
Links
#end if #set $src = (($TVINFO_TVMAZE, 'tvm'), ($TVINFO_TMDB, 'tmdb'), ($TVINFO_TRAKT, 'trakt')) #if any([$person.ids.get($cur_src) for ($cur_src, _) in $src])
Other shows
#end if
#if $person.biography

Bio

## cleanup bio

$re.sub(r'\s+.*?CC-BY-SA.*?$', '', $person.biography).replace('\n', '
')

#end if
#include $os.path.join($sg_str('PROG_DIR'), 'gui/slick/interfaces/default/inc_bottom.tmpl')