mirror of
https://github.com/SickGear/SickGear.git
synced 2024-11-15 09:25:04 +00:00
199 lines
8.8 KiB
Cheetah
199 lines
8.8 KiB
Cheetah
|
#import sickgear
|
||
|
#import os
|
||
|
##
|
||
|
#set global $title = 'Search Tasks'
|
||
|
#set global $header = 'Search Tasks'
|
||
|
#set global $sbPath = '..'
|
||
|
#set global $topmenu = 'manage'
|
||
|
#set $dev_mode = os.environ.get('SG_DEV_MODE')
|
||
|
##
|
||
|
#import os.path
|
||
|
#include $os.path.join($sickgear.PROG_DIR, 'gui/slick/interfaces/default/inc_top.tmpl')
|
||
|
|
||
|
<input type="hidden" id="sbRoot" value="$sbRoot">
|
||
|
<script type="text/javascript" src="$sbRoot/js/plotTooltip.js?v=$sbPID"></script>
|
||
|
<script type="text/javascript" src="$sbRoot/js/manageSearches.js?v=$sbPID"></script>
|
||
|
|
||
|
<div id="media-search" class="align-left">
|
||
|
|
||
|
#if $varExists('header')
|
||
|
<h1 class="header">$header</h1>
|
||
|
#else
|
||
|
<h1 class="title">$title</h1>
|
||
|
#end if
|
||
|
|
||
|
|
||
|
|
||
|
<div id="backlog-search" class="section">
|
||
|
<h3>Backlog Search:</h3>
|
||
|
<a id="forcebacklog" class="btn#if $standard_backlog_running or $backlog_is_active or not $scheduled_backlog_active_providers# disabled#end if#" href="$sbRoot/manage/search-tasks/force-backlog"><i class="sgicon-play"></i> Force</a>
|
||
|
<a id="pausebacklog" class="btn" href="$sbRoot/manage/search-tasks/pause-backlog?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>
|
||
|
#if $backlog_paused
|
||
|
Paused:
|
||
|
#end if##slurp#
|
||
|
#if not $backlog_running and not $backlog_is_active:
|
||
|
#if not $scheduled_backlog_active_providers
|
||
|
#set $text = 'Enable both active AND scheduled search for one or more providers at config media providers'
|
||
|
#for ($tag_class, $sub) in (
|
||
|
('grey-text', 'Enable'), ('red-text', 'both'),
|
||
|
('red-text', 'AND'), ('grey-text', 'for one or more providers at config')):
|
||
|
#set $text = $text.replace($sub, '<span class="%s">%s</span>' % ($tag_class, $sub))
|
||
|
#end for
|
||
|
#set $sub = 'media providers'
|
||
|
#set $text = $text.replace($sub, '<a href="%s/config/providers/#core-component-group2">%s</a>' % ($sbRoot, $sub))
|
||
|
<i class="img-warning-16"></i>$text
|
||
|
#else
|
||
|
Not in progress
|
||
|
#end if
|
||
|
#else
|
||
|
Currently running#if $backlog_running_type != "None"# ($backlog_running_type)#end if#
|
||
|
#end if
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
<div id="recent-search" class="section">
|
||
|
<h3>Recent Search:</h3>
|
||
|
<a id="recentsearch" class="btn#if $recent_search_status# disabled#end if#" href="$sbRoot/manage/search-tasks/force-search"><i class="sgicon-play"></i> Force</a>
|
||
|
#if not $recent_search_status
|
||
|
Not in progress
|
||
|
#else
|
||
|
In Progress
|
||
|
#end if
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
<div id="propers-search" class="section">
|
||
|
<h3>Find Propers Search:</h3>
|
||
|
<a id="propersearch" class="btn#if $find_propers_status# disabled#end if#" href="$sbRoot/manage/search-tasks/force-find-propers"><i class="sgicon-play"></i> Force</a>
|
||
|
#if not $find_propers_status
|
||
|
Not in progress
|
||
|
#else
|
||
|
In Progress
|
||
|
#end if
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
<div id="search-queues" class="section">
|
||
|
<h3>Search Queues:</h3>
|
||
|
|
||
|
#if $queue_length['backlog'] or $queue_length['manual'] or $queue_length['failed']
|
||
|
<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>
|
||
|
#end if
|
||
|
<div id="queue-recent" class="section">
|
||
|
Recent: <i>$queue_length['recent'] item$sickgear.helpers.maybe_plural($queue_length['recent'])</i>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<div id="queue-proper" class="section">
|
||
|
Proper: <i>$len($queue_length['proper']) item$sickgear.helpers.maybe_plural($queue_length['proper'])</i>
|
||
|
#if $queue_length['proper']
|
||
|
<input type="button" class="shows-more btn" id="proper-btn-more" value="Expand" #if not $queue_length['proper']# style="display:none" #end if#><input type="button" class="shows-less btn" id="proper-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['proper']:
|
||
|
#if $cur_item['recent']:
|
||
|
#set $search_type = 'Recent'
|
||
|
#else
|
||
|
#set $search_type = 'Scheduled'
|
||
|
#end if
|
||
|
<tr class="#echo ('odd', 'even')[$row % 2]##set $row+=1#">
|
||
|
<td style="width:20%;text-align:center;color:white">$search_type</td>
|
||
|
</tr>
|
||
|
#end for
|
||
|
</tbody>
|
||
|
</table>
|
||
|
#end if
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<div id="queue-backlog" class="section">
|
||
|
Backlog: <i>$len($queue_length['backlog']) item$sickgear.helpers.maybe_plural($len($queue_length['backlog']))</i>#if $dev_mode #<input type="button" class="btn" id="clear-btn-backlog" value="Clear" data-action="$sickgear.search_queue.BACKLOG_SEARCH">#end if#
|
||
|
#if $queue_length['backlog']
|
||
|
<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/view-show?tvid_prodid=$cur_item['tvid_prodid']">$cur_item['name']</a> - $sickgear.helpers.make_search_segment_html_string($cur_item['segment'])
|
||
|
</td>
|
||
|
<td style="width:20%;text-align:center;color:white">$search_type#if $dev_mode #<input type="button" class="btn" id="remove-btn-$cur_item['uid']" value="Remove" data-uid="$cur_item['uid']">#end if#</td>
|
||
|
</tr>
|
||
|
#end for
|
||
|
</tbody>
|
||
|
</table>
|
||
|
#end if
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<div id="queue-manual" class="section">
|
||
|
Manual: <i>$len($queue_length['manual']) item$sickgear.helpers.maybe_plural($len($queue_length['manual']))</i> #if $dev_mode #<input type="button" class="btn" id="clear-btn-manual" value="Clear" data-action="$sickgear.search_queue.MANUAL_SEARCH">#end if#
|
||
|
#if $queue_length['manual']
|
||
|
<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/view-show?tvid_prodid=$cur_item['tvid_prodid']">$cur_item['name']</a> - $sickgear.helpers.make_search_segment_html_string($cur_item['segment'])
|
||
|
#if $dev_mode #<input type="button" class="btn" id="remove-btn-$cur_item['uid']" value="Remove" data-uid="$cur_item['uid']">#end if#
|
||
|
</td>
|
||
|
</tr>
|
||
|
#end for
|
||
|
</tbody>
|
||
|
</table>
|
||
|
#end if
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<div id="queue-failed" class="section">
|
||
|
Failed: <i>$len($queue_length['failed']) item$sickgear.helpers.maybe_plural($len($queue_length['failed']))</i> #if $dev_mode #<input type="button" class="btn" id="clear-btn-failed" value="Clear" data-action="$sickgear.search_queue.FAILED_SEARCH">#end if#
|
||
|
#if $queue_length['failed']
|
||
|
<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/view-show?tvid_prodid=$cur_item['tvid_prodid']">$cur_item['name']</a> - $sickgear.helpers.make_search_segment_html_string($cur_item['segment'])
|
||
|
#if $dev_mode #<input type="button" class="btn" id="remove-btn-$cur_item['uid']" value="Remove" data-uid="$cur_item['uid']">#end if#
|
||
|
</td>
|
||
|
</tr>
|
||
|
#end for
|
||
|
</tbody>
|
||
|
</table>
|
||
|
#end if
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
#include $os.path.join($sickgear.PROG_DIR, 'gui/slick/interfaces/default/inc_bottom.tmpl')
|