#import sickbeard #import os.path #import datetime #import re #from sickbeard import history #from sickbeard import providers #from sickbeard import sbdatetime #from sickbeard.providers import generic #from sickbeard.common import * #set global $title="History" #set global $header="History" #set global $sbPath=".." #set global $topmenu="history"# #set $layout = $sickbeard.HISTORY_LAYOUT #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl") #if $varExists('header')

$header

#else

$title

#end if
Limit:
Layout: Compact · Detailed
#if $layout == "detailed" #for $hItem in $historyResults: #set $curStatus, $curQuality = $Quality.splitCompositeStatus(int($hItem["action"])) #set $curdatetime = $datetime.datetime.strptime(str($hItem["date"]), $history.dateFormat) $curQuality #end for
TimeEpisodeActionProviderQuality
$sbdatetime.sbdatetime.sbfdatetime($curdatetime, show_seconds=True)$time.mktime($curdatetime.timetuple()) $hItem["show_name"] - <%=str(hItem["season"]) +"x"+ "%02i" % int(hItem["episode"]) %>#if "proper" in $hItem["resource"].lower or "repack" in $hItem["resource"].lower then ' Proper' else ""# $statusStrings[$curStatus] #if $curStatus == SUBTITLED: "> #end if #if $curStatus == DOWNLOADED: #set $match = $re.search("\-(\w+)\.\w{3}\Z", $os.path.basename($hItem["resource"])) #if $match #if $match.group(1).upper() in ("X264", "720P"): #set $match = $re.search("(\w+)\-.*\-"+$match.group(1)+"\.\w{3}\Z", $os.path.basename($hItem["resource"]), re.IGNORECASE) #if $match $match.group(1).upper() #end if #else: $match.group(1).upper() #end if #end if #else #if $hItem["provider"] > 0 #if $curStatus in [SNATCHED, FAILED]: #set $provider = $providers.getProviderClass($generic.GenericProvider.makeID($hItem["provider"])) #if $provider != None: $provider.name #else: missing provider #end if #else: " width="16" height="16" alt="$hItem["provider"]" title="<%=hItem["provider"].capitalize()%>"/> #end if #end if #end if $Quality.qualityStrings[$curQuality]
#else: #if sickbeard.USE_SUBTITLES then "" else ""# #for $hItem in $compactResults: #set $curdatetime = $datetime.datetime.strptime(str($hItem["actions"][0]["time"]), $history.dateFormat) #if sickbeard.USE_SUBTITLES: #end if #end for
TimeEpisodeSnatchedDownloadedSubtitledQuality
$sbdatetime.sbdatetime.sbfdatetime($curdatetime, show_seconds=True)$time.mktime($curdatetime.timetuple()) $hItem["show_name"]
"/>
<%=str(hItem["season"])%>
x
<%= "%02i" % int(hItem["episode"])%>
"> #for $action in sorted($hItem["actions"]): #set $curStatus, $curQuality = $Quality.splitCompositeStatus(int($action["action"])) #if $curStatus in [SNATCHED, FAILED]: #set $provider = $providers.getProviderClass($generic.GenericProvider.makeID($action["provider"])) #if $provider != None: $provider.name #else: missing provider #end if #end if #end for #for $action in sorted($hItem["actions"]): #set $curStatus, $curQuality = $Quality.splitCompositeStatus(int($action["action"])) #if $curStatus == DOWNLOADED: #set $match = $re.search("\-(\w+)\.\w{3}\Z", $os.path.basename($action["resource"])) #if $match #if $match.group(1).upper() in ("X264", "720P"): #set $match = $re.search("(\w+)\-.*\-"+$match.group(1)+"\.\w{3}\Z", $os.path.basename($hItem["resource"]), re.IGNORECASE) #if $match $match.group(1).upper() #end if #else: $match.group(1).upper() #end if #end if #end if #end for #for $action in sorted($hItem["actions"]): #set $curStatus, $curQuality = $Quality.splitCompositeStatus(int($action["action"])) #if $curStatus == SUBTITLED: " width="16" height="16" alt="$action["provider"]" title="<%=action["provider"].capitalize()%>: $os.path.basename($action["resource"])"/> / " style="vertical-align: middle !important;">   #end if #end for $Quality.qualityStrings[$curQuality]
#end if #include $os.path.join($sickbeard.PROG_DIR,"gui/slick/interfaces/default/inc_bottom.tmpl")