#import datetime #import sickbeard #from sickbeard import network_timezones, sbdatetime, subtitles #from sickbeard.common import Overview, Quality, statusStrings, ARCHIVED, UNAIRED, SUBTITLED #from lib import subliminal <% def sg_var(varname, default=False): return getattr(sickbeard, varname, default) %>#slurp# <% def sg_str(varname, default=''): return getattr(sickbeard, varname, default) %>#slurp# ####### #set $network_timezone = $network_timezones.get_network_timezone($show.network) #set $network_time = $network_timezones.parse_time($show.airs) #set $odd = 0 #set $fuzzydate = 'airdate' #set $scene, $scene_anime = (False, False) #if not $show.air_by_date and not $show.is_sports and not $show.is_anime and $show.is_scene #set $scene = True #elif not $show.air_by_date and not $show.is_sports and $show.is_anime and $show.is_scene #set $scene_anime = True #end if #set $attr_title_ep = ('', ' (Anime #)')[$show.is_anime] ## #set $eps = $getVar('episodes', None) or [$episode] #for $ep in $eps #set $ep_str = '%sx%s' % ($ep['season'], $ep['episode']) #set $epLoc = $ep['location'] #set never_aired = 0 < int($ep['season']) and 1 == int($ep['airdate']) #if $UNAIRED != int($ep['status']) and not $never_aired #end if #set $nfo, $nfo_img = (('No', '-no'), ('Yes', ''))[int($ep['hasnfo'])] #set $tbn, $tbn_img = (('No', '-no'), ('Yes', ''))[int($ep['hastbn'])] $nfo
$tbn #if $epLoc and $show._location and $epLoc.lower().startswith($show._location.lower()) #set $epLoc = $epLoc[len($show._location)+1:] #elif $epLoc and (not $epLoc.lower().startswith($show._location.lower()) or not $show._location) #set $epLoc = $epLoc #end if #set $episode = str($ep['episode']) + ('', ' (%s)' % $ep['absolute_number'])[$show.is_anime] #set $downloaded = ('', 'file %s
size %s' % ($epLoc, $sickbeard.helpers.human($ep['file_size'])))['' != $epLoc and None != $epLoc] #set $attr=(('', 'Ep # %s' % $attr_title_ep)[bool($attr_title_ep)], $downloaded)[any($downloaded)] $episode #slurp #if $scene #set $dfltSeas, $dfltEpis = (0, 0) if ($ep['season'], $ep['episode']) not in $xem_numbering else $xem_numbering[($ep['season'], $ep['episode'])] #elif $scene_anime #set $dfltAbsolute = 0 if $ep['absolute_number'] not in $xem_absolute_numbering else $xem_absolute_numbering[$ep['absolute_number']] #end if #slurp ' %\ ('None opacity40', ('" id="plot_info_%s_%s_%s' % ($show.indexerid, $ep['season'], $ep['episode'])))[None is not $ep['description'] and '' != $ep['description']]# #if not $ep['name'] or 'TBA' == $ep['name']#TBA#else#$ep['name']#end if# #if 1 == int($ep['airdate']) then 'never' else $sbdatetime.sbdatetime.sbfdate($sbdatetime.sbdatetime.convert_to_setting($network_timezones.parse_date_time($ep['airdate'], $network_time, $network_timezone)))# #if $sg_var('USE_SUBTITLES') and $show.subtitles #if $ep['subtitles'] #for $sub_lang in subliminal.language.language_list($ep['subtitles'].split(',')) #if '' != sub_lang.alpha2 ${sub_lang} #end if #end for #end if #end if #slurp #set $curStatus, $curQuality = $Quality.splitCompositeStatus(int($ep['status'])) #if Quality.NONE != $curQuality #if SUBTITLED == $curStatus##else#$statusStrings[$curStatus].replace('Downloaded', '')#end if# $Quality.qualityStrings[$curQuality] #else $statusStrings[$curStatus] #end if #if 0 != int($ep['season']) #if (int($ep['status']) in $Quality.SNATCHED or int($ep['status']) in $Quality.DOWNLOADED) and $sg_var('USE_FAILED_DOWNLOADS') retry #else search #end if #end if #slurp #if $sg_var('USE_SUBTITLES') and $show.subtitles and len(set(str($ep['subtitles']).split(',')).intersection(set($subtitles.wantedLanguages()))) < len($subtitles.wantedLanguages()) and $ep['location'] search subtitles #end if #end for