#import sickbeard
#from sickbeard import sbdatetime
##
#set global $title = 'Media Search'
#set global $header = 'Media Search'
#set global $sbPath = '..'
#set global $topmenu = 'manage'
##
#import os.path
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_top.tmpl')
#if $varExists('header')
$header
#else
$title
#end if
Backlog Search:
Force #if $backlog_paused then "Unpause" else "Pause"#
#if $backlog_paused then 'Paused: ' else ''#
#if not $backlog_running and not $backlog_is_active:
Not in progress
#else
Currently running#if $backlog_running_type != "None"# ($backlog_running_type)#end if#
#end if
Recent Search:
Force
#if not $recent_search_status
Not in progress
#else
In Progress
#end if
Find Propers Search:
Force
#if not $find_propers_status
Not in progress
#else
In Progress
#end if
#if $provider_errors
Provider Errors:
#for $prov in $provider_error_stats
#if $len($prov['errors'])
$prov['name']
#if $prov['next_try']
#set nt = $str($prov['next_try']).split('.', 2)
Next try in: $nt[0]
#end if
Day
http
connection
connection timeout
timeout
unknown
no data
#if $prov['has_limit']
Hit Limit
#end if
#set $row = 0
#for $error in $prov['errors']
$sbdatetime.sbdatetime.sbfdate($error['date'])
$error['http'].get('count', 0)
$error['connection'].get('count', 0)
$error['connection_timeout'].get('count', 0)
$error['timeout'].get('count', 0)
$error['unknown'].get('count', 0)
$error['nodata'].get('count', 0)
#if $prov['has_limit']
$error.get('limit', {}).get('count', 0)
#end if
#end for
#end if
#end for
#end if
Search Queue:
#if $queue_length['backlog'] or $queue_length['manual'] or $queue_length['failed']
#end if
Recent: $queue_length['recent'] item$sickbeard.helpers.maybe_plural($queue_length['recent'])