2014-03-10 05:18:05 +00:00
#import sickbeard
2017-11-02 18:30:05 +00:00
#from sickbeard import sbdatetime
2015-05-07 00:36:40 +00:00
##
2016-12-18 20:24:18 +00:00
#set global $ title = ' Media Search '
#set global $ header = ' Media Search '
2015-05-07 00:36:40 +00:00
#set global $ sbPath = ' .. '
#set global $ topmenu = ' manage '
##
2014-03-10 05:18:05 +00:00
#import os . path
2015-05-07 00:36:40 +00:00
#include $ os . path . join ( $ sickbeard . PROG_DIR , ' gui/slick/interfaces/default/inc_top.tmpl ' )
2014-03-10 05:18:05 +00:00
2018-01-15 17:54:36 +00:00
<input type="hidden" id="sbRoot" value=" $ sbRoot ">
2015-09-12 07:17:26 +00:00
<script type="text/javascript" src=" $ sbRoot /js/plotTooltip.js?v= $ sbPID "></script>
<script type="text/javascript" src=" $ sbRoot /js/manageSearches.js?v= $ sbPID "></script>
2018-01-15 17:54:36 +00:00
<div id="media-search" class="align-left">
2015-05-07 00:36:40 +00:00
#if $ varExists ( ' header ' )
<h1 class="header"> $ header </h1>
#else
<h1 class="title"> $ title </h1>
#end if
2014-03-10 05:18:05 +00:00
2018-01-15 17:54:36 +00:00
<div id="backlog-search" class="section">
2015-05-07 00:36:40 +00:00
<h3>Backlog Search:</h3>
2017-09-06 09:08:31 +00:00
<a id="forcebacklog" class="btn #if $ standard_backlog_running or $ backlog_is_active # disabled #end if# " href=" $ sbRoot /manage/manageSearches/forceBacklog"><i class="sgicon-play"></i> Force</a>
<a id="pausebacklog" class="btn" href=" $ sbRoot /manage/manageSearches/pauseBacklog?paused= #if $ backlog_paused then " 0 " else " 1 " # "><i class=" #if $ backlog_paused then " sgicon-play " else " sgicon-pause " # "></i> #if $ backlog_paused then " Unpause " else " Pause " # </a>
2018-01-15 17:54:36 +00:00
#if $ backlog_paused
Paused:
#end if# #slurp #
2017-09-06 09:08:31 +00:00
#if not $ backlog_running and not $ backlog_is_active :
2018-01-15 17:54:36 +00:00
Not in progress
2015-05-07 00:36:40 +00:00
#else
2018-01-15 17:54:36 +00:00
Currently running #if $ backlog_running_type != " None " # ( $ backlog_running_type ) #end if#
2015-05-04 19:14:29 +00:00
#end if
2018-01-15 17:54:36 +00:00
</div>
2014-03-10 05:18:05 +00:00
2018-01-15 17:54:36 +00:00
<div id="recent-search" class="section">
2015-05-07 00:36:40 +00:00
<h3>Recent Search:</h3>
2017-09-06 09:08:31 +00:00
<a id="recentsearch" class="btn #if $ recent_search_status # disabled #end if# " href=" $ sbRoot /manage/manageSearches/forceSearch"><i class="sgicon-play"></i> Force</a>
#if not $ recent_search_status
2018-01-15 17:54:36 +00:00
Not in progress
2015-05-07 00:36:40 +00:00
#else
2018-01-15 17:54:36 +00:00
In Progress
2014-05-19 17:40:25 +00:00
#end if
2018-01-15 17:54:36 +00:00
</div>
2014-05-19 17:40:25 +00:00
2018-01-15 17:54:36 +00:00
<div id="propers-search" class="section">
2015-05-07 00:36:40 +00:00
<h3>Find Propers Search:</h3>
2017-09-06 09:08:31 +00:00
<a id="propersearch" class="btn #if $ find_propers_status # disabled #end if# " href=" $ sbRoot /manage/manageSearches/forceFindPropers"><i class="sgicon-play"></i> Force</a>
#if not $ find_propers_status
2018-01-15 17:54:36 +00:00
Not in progress
2015-05-07 00:36:40 +00:00
#else
2018-01-15 17:54:36 +00:00
In Progress
2014-05-15 04:16:46 +00:00
#end if
2018-01-15 17:54:36 +00:00
</div>
<div id="provider-failures" class="section">
<h3>Provider Failures:</h3>
#if not $ provider_fails
<p>No current failures. Failure stats display here when appropriate.</p>
#else
<p>Some providers can be often down over periods, SickGear will back off then retry connecting at a later time</p>
#for $ prov in $ provider_fail_stats
#if $ len ( $ prov [ ' fails ' ] )
<input type="button" class="shows-more btn" id=" $ prov ['name']-btn-more" value="Expand" style="display:none"><input type="button" class="shows-less btn" id=" $ prov ['name']-btn-less" value="Collapse"><img src=" $ sbRoot /images/providers/ $ prov ['prov_img']" width="16" height="16" style="margin:0 6px" /> $ prov ['name']
#if $ prov [ ' active ' ]
#if $ prov [ ' next_try ' ]
#set nt = $ str ( $ prov [ ' next_try ' ] ) . split ( ' . ' , 2 )
... is blocked until $ sbdatetime . sbdatetime . sbftime ( $ sbdatetime . sbdatetime . now () + $ prov ['next_try'], markup=True) (in $ nt [0]) <input type="button" class="provider-retry btn" id=" $ prov ['prov_id']-btn-retry" value="Ignore block on next search">
#end if
#else
... is not enabled
#end if
<table class="manageTable provider-failures tablesorter hover-highlight focus-highlight text-center" cellspacing="0" border="0" cellpadding="0">
<thead>
<tr>
<th class="text-center" style="width:13em;padding-right:20px">period of 1hr</th>
<th class="text-center" style="padding-right:20px">server/timeout</th>
<th class="text-center" style="padding-right:20px">network</th>
<th class="text-center" style="padding-right:20px">no data</th>
<th class="text-center" style="padding-right:20px">other</th>
#if $ prov [ ' has_limit ' ]
<th class="text-center" style="padding-right:20px">hit limit</th>
#end if
</tr>
2017-11-02 18:30:05 +00:00
</thead>
<tbody>
2018-01-15 17:54:36 +00:00
#set $ day = [ ]
#for $ fail in $ prov [ ' fails ' ]
#set $ child = True
#if $ fail [ ' date ' ] not in $ day
#set $ day + = [ $ fail [ ' date ' ] ]
#set $ child = False
#end if
#slurp #
<tr #if $ fail [ ' multirow ' ] and $ child # class="tablesorter-childRow" #end if# >
#if $ fail [ ' multirow ' ]
#if not $ child
<td><a href=" #" class="provider-fail-parent-toggle" title="Totals (expand for detail)"> $ sbdatetime . sbdatetime . sbfdate ( $ fail ['date_time'])</a></td>
#else
<td> $ sbdatetime . sbdatetime . sbftime ( $ fail ['date_time'], markup=True)</td>
#end if
#else
<td> $ sbdatetime . sbdatetime . sbfdatetime ( $ fail ['date_time'], markup=True)</td>
#end if
#set $ blank = ' - '
#set $ title = None
#if $ fail [ ' http ' ] [ ' count ' ]
#set $ title = $ fail [ ' http ' ] [ ' code ' ]
#end if
<td> #if $ fail [ ' http ' ] [ ' count ' ] # <span title=" #if $ child # $ title #else # Expand for fail codes #end if# "> $ fail ['http']['count']</span> #else # $ blank #end if# / #echo $ fail [ ' timeout ' ] . get ( ' count ' , 0 ) or $ blank # </td>
<td> #echo ( $ fail [ ' connection ' ] . get ( ' count ' , 0 ) + $ fail [ ' connection_timeout ' ] . get ( ' count ' , 0 ) ) or $ blank # </td>
<td> #echo $ fail [ ' nodata ' ] . get ( ' count ' , 0 ) or $ blank # </td>
<td> #echo $ fail [ ' other ' ] . get ( ' count ' , 0 ) or $ blank # </td>
#if $ prov [ ' has_limit ' ]
<td> #echo $ fail . get ( ' limit ' , { } ) . get ( ' count ' , 0 ) or $ blank # </td>
#end if
</tr>
#end for
2017-11-02 18:30:05 +00:00
</tbody>
</table>
2018-01-15 17:54:36 +00:00
#end if
#end for
2017-11-02 18:30:05 +00:00
#end if
2018-01-15 17:54:36 +00:00
</div>
<div id="search-queues" class="section">
<h3>Search Queues:</h3>
2017-09-06 09:08:31 +00:00
#if $ queue_length [ ' backlog ' ] or $ queue_length [ ' manual ' ] or $ queue_length [ ' failed ' ]
2017-08-16 19:15:19 +00:00
<input type="button" class="show-all-more btn" id="all-btn-more" value="Expand All"><input type="button" class="show-all-less btn" id="all-btn-less" value="Collapse All"><br>
2015-05-04 19:14:29 +00:00
#end if
2018-01-15 17:54:36 +00:00
<div id="queue-recent" class="section">
Recent: <i> $ queue_length ['recent'] item $ sickbeard . helpers . maybe_plural ( $ queue_length ['recent'])</i>
</div>
<div id="queue-proper" class="section">
Proper: <i> $ queue_length ['proper'] item $ sickbeard . helpers . maybe_plural ( $ queue_length ['proper'])</i>
</div>
<div id="queue-backlog" class="section">
Backlog: <i> $ len ( $ queue_length ['backlog']) item $ sickbeard . helpers . maybe_plural ( $ len ( $ queue_length ['backlog']))</i>
2017-09-06 09:08:31 +00:00
#if $ queue_length [ ' backlog ' ]
2018-01-15 17:54:36 +00:00
<input type="button" class="shows-more btn" id="backlog-btn-more" value="Expand" #if not $ queue_length [ ' backlog ' ] # style="display:none" #end if# ><input type="button" class="shows-less btn" id="backlog-btn-less" value="Collapse" style="display:none"><br>
<table class="sickbeardTable manageTable" cellspacing="1" border="0" cellpadding="0" style="display:none">
<thead></thead>
<tbody>
#set $ row = 0
#for $ cur_item in $ queue_length [ ' backlog ' ] :
#set $ search_type = ' On Demand '
#if $ cur_item [ ' standard_backlog ' ] :
#if $ cur_item [ ' forced ' ] :
#set $ search_type = ' Forced '
#else
#set $ search_type = ' Scheduled '
#end if
#if $ cur_item [ ' torrent_only ' ] :
#set $ search_type + = ' , Torrent Only '
#end if
#if $ cur_item [ ' limited_backlog ' ] :
#set $ search_type + = ' (Limited) '
#else
#set $ search_type + = ' (Full) '
#end if
#end if
<tr class=" #echo ( ' odd ' , ' even ' ) [ $ row % 2 ] # #set $ row + = 1 # ">
<td style="width:80%;text-align:left;color:white">
<a class="whitelink" href=" $ sbRoot /home/displayShow?show= $ cur_item ['indexerid']"> $ cur_item ['name']</a> - $ sickbeard . helpers . make_search_segment_html_string ( $ cur_item ['segment'])
</td>
<td style="width:20%;text-align:center;color:white"> $ search_type </td>
</tr>
#end for
</tbody>
</table>
2015-05-04 19:14:29 +00:00
#end if
2018-01-15 17:54:36 +00:00
</div>
<div id="queue-manual" class="section">
Manual: <i> $ len ( $ queue_length ['manual']) item $ sickbeard . helpers . maybe_plural ( $ len ( $ queue_length ['manual']))</i>
2017-09-06 09:08:31 +00:00
#if $ queue_length [ ' manual ' ]
2018-01-15 17:54:36 +00:00
<input type="button" class="shows-more btn" id="manual-btn-more" value="Expand" #if not $ queue_length [ ' manual ' ] # style="display:none" #end if# ><input type="button" class="shows-less btn" id="manual-btn-less" value="Collapse" style="display:none"><br>
<table class="sickbeardTable manageTable" cellspacing="1" border="0" cellpadding="0" style="display:none">
<thead></thead>
<tbody>
#set $ row = 0
#for $ cur_item in $ queue_length [ ' manual ' ] :
<tr class=" #echo ( ' odd ' , ' even ' ) [ $ row % 2 ] # #set $ row + = 1 # ">
<td style="width:100%;text-align:left;color:white">
<a class="whitelink" href=" $ sbRoot /home/displayShow?show= $ cur_item ['indexerid']"> $ cur_item ['name']</a> - $ sickbeard . helpers . make_search_segment_html_string ( $ cur_item ['segment'])
</td>
</tr>
#end for
</tbody>
</table>
2015-05-04 19:14:29 +00:00
#end if
2018-01-15 17:54:36 +00:00
</div>
<div id="queue-failed" class="section">
Failed: <i> $ len ( $ queue_length ['failed']) item $ sickbeard . helpers . maybe_plural ( $ len ( $ queue_length ['failed']))</i>
2017-09-06 09:08:31 +00:00
#if $ queue_length [ ' failed ' ]
2018-01-15 17:54:36 +00:00
<input type="button" class="shows-more btn" id="failed-btn-more" value="Expand" #if not $ queue_length [ ' failed ' ] # style="display:none" #end if# ><input type="button" class="shows-less btn" id="failed-btn-less" value="Collapse" style="display:none"><br>
<table class="sickbeardTable manageTable" cellspacing="1" border="0" cellpadding="0" style="display:none">
<thead></thead>
<tbody>
#set $ row = 0
#for $ cur_item in $ queue_length [ ' failed ' ] :
<tr class=" #echo ( ' odd ' , ' even ' ) [ $ row % 2 ] # #set $ row + = 1 # ">
<td style="width:100%;text-align:left;color:white">
<a class="whitelink" href=" $ sbRoot /home/displayShow?show= $ cur_item ['indexerid']"> $ cur_item ['name']</a> - $ sickbeard . helpers . make_search_segment_html_string ( $ cur_item ['segment'])
</td>
</tr>
#end for
</tbody>
</table>
2015-05-04 19:14:29 +00:00
#end if
2018-01-15 17:54:36 +00:00
</div>
2015-05-07 00:36:40 +00:00
</div>
2018-01-15 17:54:36 +00:00
2014-09-30 22:20:37 +00:00
</div>
2015-05-07 00:36:40 +00:00
2016-09-04 20:00:44 +00:00
#include $ os . path . join ( $ sickbeard . PROG_DIR , ' gui/slick/interfaces/default/inc_bottom.tmpl ' )