1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-12 11:02:21 -05:00

Merge branch 'feature/OverhaulSearchSettings' of https://github.com/JackDandy/SickRage into develop

This commit is contained in:
Adam 2014-10-29 12:33:28 +08:00
commit a38a9de8cb
3 changed files with 605 additions and 687 deletions

View File

@ -33,6 +33,7 @@
* Styled config_providers to match new config_general styling * Styled config_providers to match new config_general styling
* Removed qtip from providers and converted back to a tab * Removed qtip from providers and converted back to a tab
* Removed superfish-1.4.8.js and supersubs-0.2b.js as they no longer break provider sorting with qtip removed and is no longer required due to new UI * Removed superfish-1.4.8.js and supersubs-0.2b.js as they no longer break provider sorting with qtip removed and is no longer required due to new UI
* Overhaul Config Search Settings in line with General Configuration
### 0.2.1 (2014-10-22 06:41:00 UTC) ### 0.2.1 (2014-10-22 06:41:00 UTC)

View File

@ -1,13 +1,13 @@
#import sickbeard #import sickbeard
#from sickbeard import clients #from sickbeard import clients
#set global $title="Config - Episode Search" #set global $title = 'Config - Episode Search'
#set global $header="Search Options" #set global $header = 'Search Settings'
#set global $sbPath="../.." #set global $sbPath = '../..'
#set global $topmenu="config"# #set global $topmenu = 'config'
#import os.path #import os.path
#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl") #include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_top.tmpl')
<script type="text/javascript" src="$sbRoot/js/configSearch.js?$sbPID"></script> <script type="text/javascript" src="$sbRoot/js/configSearch.js?$sbPID"></script>
<script type="text/javascript" src="$sbRoot/js/config.js?$sbPID"></script> <script type="text/javascript" src="$sbRoot/js/config.js?$sbPID"></script>
@ -18,6 +18,9 @@
<h1 class="title">$title</h1> <h1 class="title">$title</h1>
#end if #end if
#set $html_selected = ' selected="selected"'
#set $html_checked = 'checked="checked" '
<div id="config"> <div id="config">
<div id="config-content"> <div id="config-content">
@ -35,33 +38,30 @@
<div class="component-group-desc"> <div class="component-group-desc">
<h3>Episode Search</h3> <h3>Episode Search</h3>
<p>Settings that dictate how and when episode searching works with <a href="$sbRoot/config/providers">Providers</a>.</p> <p>How to manage searching with <a href="$sbRoot/config/providers">providers</a>.</p>
</div> </div>
<fieldset class="component-group-list"> <fieldset class="component-group-list">
<div class="field-pair"> <div class="field-pair">
<input type="checkbox" name="download_propers" id="download_propers" class="enabler" #if $sickbeard.DOWNLOAD_PROPERS == True then "checked=\"checked\"" else ""# />
<label for="download_propers"> <label for="download_propers">
<span class="component-title">Download Propers</span> <span class="component-title">Download propers</span>
<span class="component-desc">Replace original download with "Proper/Repack" if nuked?</span> <span class="component-desc">
<input type="checkbox" name="download_propers" id="download_propers" class="enabler" <%= html_checked if sickbeard.DOWNLOAD_PROPERS == True else '' %>/>
<p>replace original download with "Proper" or "Repack" if nuked</p>
</span>
</label> </label>
</div> </div>
<div id="content_download_propers"> <div id="content_download_propers">
<div class="field-pair"> <div class="field-pair">
<label class="nocheck" for="check_propers_interval"> <label for="check_propers_interval">
<span class="component-title">Check Propers Every:</span> <span class="component-title">Check propers every:</span>
<span class="component-desc"> <span class="component-desc">
<select id="check_propers_interval" name="check_propers_interval" class="form-control input-sm"> <select id="check_propers_interval" name="check_propers_interval" class="form-control input-sm">
#set $check_propers_interval_text = {'daily': "24 hours", '4h': "4 hours", '90m': "90 mins", '45m': "45 mins", '15m': "15 mins"} #set $check_propers_interval_text = {'daily': "24 hours", '4h': "4 hours", '90m': "90 mins", '45m': "45 mins", '15m': "15 mins"}
#for $curInterval in ('daily', '4h', '90m', '45m', '15m'): #for $curInterval in ('daily', '4h', '90m', '45m', '15m'):
#if $sickbeard.CHECK_PROPERS_INTERVAL == $curInterval: #set $selected = $html_selected if $sickbeard.CHECK_PROPERS_INTERVAL == $curInterval else ''
#set $selMode = " selected=\"selected\"" <option value="$curInterval"$selected>$check_propers_interval_text[$curInterval]</option>
#else #end for
#set $selMode = ""
#end if
<option value="$curInterval"$selMode>$check_propers_interval_text[$curInterval]</option>
#end for
</select> </select>
</span> </span>
</label> </label>
@ -69,98 +69,92 @@
</div> </div>
<div class="field-pair"> <div class="field-pair">
<label class="nocheck"> <label>
<span class="component-title">Backlog Search Day(s)</span> <span class="component-title">Backlog search day(s)</span>
<span class="component-desc">
<input type="text" name="backlog_days" value="$sickbeard.BACKLOG_DAYS" class="form-control input-sm input75" /> <input type="text" name="backlog_days" value="$sickbeard.BACKLOG_DAYS" class="form-control input-sm input75" />
</label> <p>number of day(s) that the search will cover (e.g. 7)</p>
<label class="nocheck"> </span>
<span class="component-title">&nbsp;</span>
<span class="component-desc">Number of day(s) to search from. (example 7)</span>
</label> </label>
</div> </div>
<div class="field-pair"> <div class="field-pair">
<label class="nocheck"> <label>
<span class="component-title">Backlog Search Frequency</span> <span class="component-title">Backlog search frequency</span>
<span class="component-desc">
<input type="text" name="backlog_frequency" value="$sickbeard.BACKLOG_FREQUENCY" class="form-control input-sm input75" /> <input type="text" name="backlog_frequency" value="$sickbeard.BACKLOG_FREQUENCY" class="form-control input-sm input75" />
</label> <p>time in minutes between searches (min. $sickbeard.MIN_BACKLOG_FREQUENCY)</p>
<label class="nocheck"> </span>
<span class="component-title">&nbsp;</span>
<span class="component-desc">Time in minutes between searches (min. $sickbeard.MIN_BACKLOG_FREQUENCY)</span>
</label> </label>
</div> </div>
<div class="field-pair"> <div class="field-pair">
<label class="nocheck"> <label>
<span class="component-title">Daily Search Frequency</span> <span class="component-title">Daily search frequency</span>
<span class="component-desc">
<input type="text" name="dailysearch_frequency" value="$sickbeard.DAILYSEARCH_FREQUENCY" class="form-control input-sm input75" /> <input type="text" name="dailysearch_frequency" value="$sickbeard.DAILYSEARCH_FREQUENCY" class="form-control input-sm input75" />
</label> <p>time in minutes between searches (min. $sickbeard.MIN_DAILYSEARCH_FREQUENCY)</p>
<label class="nocheck"> </span>
<span class="component-title">&nbsp;</span>
<span class="component-desc">Time in minutes between searches (min. $sickbeard.MIN_DAILYSEARCH_FREQUENCY)</span>
</label> </label>
</div> </div>
<div class="field-pair"> <div class="field-pair">
<label class="nocheck"> <label>
<span class="component-title">Usenet Retention</span> <span class="component-title">Usenet retention</span>
<span class="component-desc">
<input type="text" name="usenet_retention" value="$sickbeard.USENET_RETENTION" class="form-control input-sm input75" /> <input type="text" name="usenet_retention" value="$sickbeard.USENET_RETENTION" class="form-control input-sm input75" />
</label> <p>age limit in days for usenet articles to be used (e.g. 500)</p>
<label class="nocheck"> </span>
<span class="component-title">&nbsp;</span>
<span class="component-desc">Age limit in days for usenet articles to be used. (eg. 500)</span>
</label> </label>
</div> </div>
<div class="field-pair"> <div class="field-pair">
<label class="nocheck"> <label>
<span class="component-title">Ignore Words</span> <span class="component-title">Ignore words</span>
<span class="component-desc">
<input type="text" name="ignore_words" value="$sickbeard.IGNORE_WORDS" class="form-control input-sm input350" /> <input type="text" name="ignore_words" value="$sickbeard.IGNORE_WORDS" class="form-control input-sm input350" />
</label> <div class="clear-left">results containing any word in the comma separated word list will be ignored</div>
<label class="nocheck"> </span>
<span class="component-title">&nbsp;</span>
<span class="component-desc">Comma separated words to check in episode search.</span>
</label>
<label class="nocheck">
<span class="component-title">&nbsp;</span>
<span class="component-desc">Results containing any word in the list won't be snatched.</span>
</label> </label>
</div> </div>
<div class="field-pair"> <div class="field-pair">
<label class="nocheck"> <label>
<span class="component-title">Require Words</span> <span class="component-title">Require words</span>
<span class="component-desc">
<input type="text" name="require_words" value="$sickbeard.REQUIRE_WORDS" class="form-control input-sm input350" /> <input type="text" name="require_words" value="$sickbeard.REQUIRE_WORDS" class="form-control input-sm input350" />
</label> <div class="clear-left">results not containing all words in the comma separated word list will be ignored</div>
<label class="nocheck"> </span>
<span class="component-title">&nbsp;</span>
<span class="component-desc">Comma separated words to check in episode search.</span>
</label>
<label class="nocheck">
<span class="component-title">&nbsp;</span>
<span class="component-desc">Results not containing all words in the list won't be snatched.</span>
</label> </label>
</div> </div>
<div class="field-pair"> <div class="field-pair">
<input type="checkbox" name="allow_high_priority" id="allow_high_priority" #if $sickbeard.ALLOW_HIGH_PRIORITY == True then "checked=\"checked\"" else ""# />
<label for="allow_high_priority"> <label for="allow_high_priority">
<span class="component-title">Allow high priority</span> <span class="component-title">Allow high priority</span>
<span class="component-desc">Set high priority for downloads of recently aired episodes?</span> <span class="component-desc">
<input type="checkbox" name="allow_high_priority" id="allow_high_priority" <%= html_checked if sickbeard.ALLOW_HIGH_PRIORITY == True else '' %>/>
<p>set downloads of recently aired episodes to high priority</p>
</span>
</label> </label>
</div> </div>
<div class="field-pair"> <div class="field-pair">
<input type="checkbox" name="dailysearch_startup" id="dailysearch_startup" #if $sickbeard.DAILYSEARCH_STARTUP == True then "checked=\"checked\"" else ""# />
<label for="dailysearch_startup"> <label for="dailysearch_startup">
<span class="component-title">Daily Search on startup</span> <span class="component-title">Daily search on startup</span>
<span class="component-desc">Start daily search upon startup of SickRage?</span> <span class="component-desc">
<input type="checkbox" name="dailysearch_startup" id="dailysearch_startup" <%= html_checked if sickbeard.DAILYSEARCH_STARTUP == True else '' %>/>
<p>start daily search on startup of SickRage</p>
</span>
</label> </label>
</div> </div>
<div class="field-pair"> <div class="field-pair">
<input type="checkbox" name="backlog_startup" id="backlog_startup" #if $sickbeard.BACKLOG_STARTUP == True then "checked=\"checked\"" else ""# />
<label for="backlog_startup"> <label for="backlog_startup">
<span class="component-title">Process backlog on startup</span> <span class="component-title">Run backlog on startup</span>
<span class="component-desc">Start processing backlogged episodes upon startup of SickRage?</span> <span class="component-desc">
<input type="checkbox" name="backlog_startup" id="backlog_startup" <%= html_checked if sickbeard.BACKLOG_STARTUP == True else '' %>/>
<p>start processing backlogged episodes on startup of SickRage</p>
</span>
</label> </label>
</div> </div>
@ -173,34 +167,31 @@
<div class="component-group-desc"> <div class="component-group-desc">
<h3>NZB Search</h3> <h3>NZB Search</h3>
<p>Settings that dictate how SickRage handles NZB search results.</p> <p>How to handle NZB search results.</p>
</div> </div>
<fieldset class="component-group-list"> <fieldset class="component-group-list">
<div class="field-pair"> <div class="field-pair">
<input type="checkbox" name="use_nzbs" class="enabler" id="use_nzbs" #if $sickbeard.USE_NZBS then "checked=\"checked\"" else ""# />
<label for="use_nzbs"> <label for="use_nzbs">
<span class="component-title">Search NZBs</span> <span class="component-title">Search NZBs</span>
<span class="component-desc">Should SickRage search for NZB files?</span> <span class="component-desc">
<input type="checkbox" name="use_nzbs" class="enabler" id="use_nzbs" <%= html_checked if sickbeard.USE_NZBS else '' %>/>
<p>enable NZB search providers</p></span>
</label> </label>
</div> </div>
<div id="content_use_nzbs"> <div id="content_use_nzbs">
<div class="field-pair"> <div class="field-pair">
<label class="nocheck" for="nzb_method"> <label for="nzb_method">
<span class="component-title">NZB Method:</span> <span class="component-title">Send .nzb files to:</span>
<span class="component-desc"> <span class="component-desc">
<select name="nzb_method" id="nzb_method" class="form-control input-sm"> <select name="nzb_method" id="nzb_method" class="form-control input-sm">
#set $nzb_method_text = {'blackhole': "Black hole", 'sabnzbd': "SABnzbd", 'nzbget': "NZBget"} #set $nzb_method_text = {'blackhole': "Black hole", 'sabnzbd': "SABnzbd", 'nzbget': "NZBget"}
#for $curAction in ('sabnzbd', 'blackhole', 'nzbget'): #for $curAction in ('sabnzbd', 'blackhole', 'nzbget'):
#if $sickbeard.NZB_METHOD == $curAction: #set $selected = $html_selected if $sickbeard.NZB_METHOD == $curAction else ''
#set $nzb_method = "selected=\"selected\"" <option value="$curAction"$selected>$nzb_method_text[$curAction]</option>
#else #end for
#set $nzb_method = ""
#end if
<option value="$curAction" $nzb_method>$nzb_method_text[$curAction]</option>
#end for
</select> </select>
</span> </span>
</label> </label>
@ -208,213 +199,161 @@
<div id="blackhole_settings"> <div id="blackhole_settings">
<div class="field-pair"> <div class="field-pair">
<label class="nocheck"> <label>
<span class="component-title">NZB Black Hole</span> <span class="component-title">Black hole folder location</span>
<span class="component-desc">
<input type="text" name="nzb_dir" id="nzb_dir" value="$sickbeard.NZB_DIR" class="form-control input-sm input350" /> <input type="text" name="nzb_dir" id="nzb_dir" value="$sickbeard.NZB_DIR" class="form-control input-sm input350" />
</label> <div class="clear-left"><p><b>.nzb</b> files are stored at this location for external software to find and use</p></div>
<label class="nocheck"> </span>
<span class="component-title">&nbsp;</span>
<span class="component-desc">The directory where SickRage should store your <i>NZB</i> files.</span>
</label> </label>
</div> </div>
</div> </div>
<div id="sabnzbd_settings"> <div id="sabnzbd_settings">
<div class="field-pair"> <div class="field-pair">
<label class="nocheck"> <label>
<span class="component-title">SABnzbd URL</span> <span class="component-title">SABnzbd server URL</span>
<span class="component-desc">
<input type="text" id="sab_host" name="sab_host" value="$sickbeard.SAB_HOST" class="form-control input-sm input350" /> <input type="text" id="sab_host" name="sab_host" value="$sickbeard.SAB_HOST" class="form-control input-sm input350" />
</label> <div class="clear-left"><p>URL to your SABnzbd server (e.g. http://localhost:8080/)</p></div>
<label class="nocheck"> </span>
<span class="component-title">&nbsp;</span>
<span class="component-desc">URL to your SABnzbd+ install</span>
</label>
<label class="nocheck">
<span class="component-title">&nbsp;</span>
<span class="component-desc">(eg. http://localhost:8000/)</span>
</label> </label>
</div> </div>
<div class="field-pair"> <div class="field-pair">
<label class="nocheck"> <label>
<span class="component-title">SABnzbd Username</span> <span class="component-title">SABnzbd username</span>
<span class="component-desc">
<input type="text" name="sab_username" id="sab_username" value="$sickbeard.SAB_USERNAME" class="form-control input-sm input200" /> <input type="text" name="sab_username" id="sab_username" value="$sickbeard.SAB_USERNAME" class="form-control input-sm input200" />
</label> <p>(blank for none)</p>
<label class="nocheck"> </span>
<span class="component-title">&nbsp;</span>
<span class="component-desc">Username of your SABnzbd+ server (blank for none)</span>
</label> </label>
</div> </div>
<div class="field-pair"> <div class="field-pair">
<label class="nocheck"> <label>
<span class="component-title">SABnzbd Password</span> <span class="component-title">SABnzbd password</span>
<span class="component-desc">
<input type="password" name="sab_password" id="sab_password" value="$sickbeard.SAB_PASSWORD" class="form-control input-sm input200" /> <input type="password" name="sab_password" id="sab_password" value="$sickbeard.SAB_PASSWORD" class="form-control input-sm input200" />
</label> <p>(blank for none)</p>
<label class="nocheck"> </span>
<span class="component-title">&nbsp;</span>
<span class="component-desc">Password of your SABnzbd+ server (blank for none)</span>
</label> </label>
</div> </div>
<div class="field-pair"> <div class="field-pair">
<label class="nocheck"> <label>
<span class="component-title">SABnzbd API Key</span> <span class="component-title">SABnzbd API key</span>
<span class="component-desc">
<input type="text" name="sab_apikey" id="sab_apikey" value="$sickbeard.SAB_APIKEY" class="form-control input-sm input350" /> <input type="text" name="sab_apikey" id="sab_apikey" value="$sickbeard.SAB_APIKEY" class="form-control input-sm input350" />
</label> <div class="clear-left"><p>locate at... SABnzbd Config -> General -> API Key</p></div>
<label class="nocheck"> </span>
<span class="component-title">&nbsp;</span>
<span class="component-desc">SABnzbd+ Config -> General -> API Key.</span>
</label> </label>
</div> </div>
<div class="field-pair"> <div class="field-pair">
<label class="nocheck"> <label>
<span class="component-title">SABnzbd Category</span> <span class="component-title">Use SABnzbd category</span>
<span class="component-desc">
<input type="text" name="sab_category" id="sab_category" value="$sickbeard.SAB_CATEGORY" class="form-control input-sm input200" /> <input type="text" name="sab_category" id="sab_category" value="$sickbeard.SAB_CATEGORY" class="form-control input-sm input200" />
</label> <p>add downloads to this category (e.g. TV)</p>
<label class="nocheck"> </span>
<span class="component-title">&nbsp;</span>
<span class="component-desc">Category for downloads to go into (eg. TV)</span>
</label> </label>
</div> </div>
</div> </div>
<div id="nzbget_settings"> <div id="nzbget_settings">
<div class="field-pair"> <div class="field-pair">
<input id="nzbget_use_https" type="checkbox" class="enabler" name="nzbget_use_https" #if $sickbeard.NZBGET_USE_HTTPS == True then "checked=\"checked\"" else ""# /> <label for="nzbget_use_https">
<label for="use_failed_downloads"> <span class="component-title">Connect using HTTPS</span>
<span class="component-title">Use HTTPS (SSL)</span> <span class="component-desc">
<span class="component-desc">Use HTTPS to connect to NZBGet?</span> <input id="nzbget_use_https" type="checkbox" class="enabler" name="nzbget_use_https" <%= html_checked if sickbeard.NZBGET_USE_HTTPS == True else '' %>/>
</label> <p><b>note:</b> enable Secure control in NZBGet and set the correct Secure Port here</p>
<label class="nocheck clearfix" for="nzbget_use_https"> </span>
<span class="component-title">&nbsp;</span>
<span class="component-desc"><b>NOTE:</b> You have to enable Secure control in NZBGet and set the correct Secure Port here.</span>
</label> </label>
</div> </div>
<div class="field-pair"> <div class="field-pair">
<label class="nocheck"> <label>
<span class="component-title">NZBget HOST:PORT</span> <span class="component-title">NZBget host:port</span>
<span class="component-desc">
<input type="text" name="nzbget_host" id="nzbget_host" value="$sickbeard.NZBGET_HOST" class="form-control input-sm input350" /> <input type="text" name="nzbget_host" id="nzbget_host" value="$sickbeard.NZBGET_HOST" class="form-control input-sm input350" />
</label> <p>(e.g. localhost:6789)</p>
<label class="nocheck"> <div class="clear-left"><p>NZBget RPC host name and port number (not NZBgetweb!)</p></div>
<span class="component-title">&nbsp;</span> </span>
<span class="component-desc">Hostname and portnumber of the NZBget RPC (not NZBgetweb!)</span>
</label>
<label class="nocheck">
<span class="component-title">&nbsp;</span>
<span class="component-desc">(eg. localhost:6789)</span>
</label> </label>
</div> </div>
<div class="field-pair"> <div class="field-pair">
<label class="nocheck"> <label>
<span class="component-title">NZBget Username</span> <span class="component-title">NZBget username</span>
<span class="component-desc">
<input type="text" name="nzbget_username" value="$sickbeard.NZBGET_USERNAME" class="form-control input-sm input200" /> <input type="text" name="nzbget_username" value="$sickbeard.NZBGET_USERNAME" class="form-control input-sm input200" />
</label> <p>locate in nzbget.conf (default:nzbget)</p>
<label class="nocheck"> </span>
<span class="component-title">&nbsp;</span>
<span class="component-desc">Username found in nzbget.conf (by default nzbget)</span>
</label> </label>
</div> </div>
<div class="field-pair"> <div class="field-pair">
<label class="nocheck"> <label>
<span class="component-title">NZBget Password</span> <span class="component-title">NZBget password</span>
<span class="component-desc">
<input type="password" name="nzbget_password" id="nzbget_password" value="$sickbeard.NZBGET_PASSWORD" class="form-control input-sm input200" /> <input type="password" name="nzbget_password" id="nzbget_password" value="$sickbeard.NZBGET_PASSWORD" class="form-control input-sm input200" />
</label> <p>locate in nzbget.conf (default:tegbzn6789)</p>
<label class="nocheck"> </span>
<span class="component-title">&nbsp;</span>
<span class="component-desc">Password found in nzbget.conf (by default tegbzn6789)</span>
</label> </label>
</div> </div>
<div class="field-pair"> <div class="field-pair">
<label class="nocheck"> <label>
<span class="component-title">NZBget Category</span> <span class="component-title">Use NZBget category</span>
<span class="component-desc">
<input type="text" name="nzbget_category" id="nzbget_category" value="$sickbeard.NZBGET_CATEGORY" class="form-control input-sm input200" /> <input type="text" name="nzbget_category" id="nzbget_category" value="$sickbeard.NZBGET_CATEGORY" class="form-control input-sm input200" />
</label> <p>send downloads marked this category (e.g. TV)</p>
<label class="nocheck"> </span>
<span class="component-title">&nbsp;</span>
<span class="component-desc">Category for downloads to go into (eg. TV)</span>
</label> </label>
</div> </div>
#if $sickbeard.NZBGET_PRIORITY == -100: #set $prio_verylow = ''
#set $prio_verylow = 'selected="selected"' #set $prio_low = ''
#set $prio_low = '' #set $prio_normal = ''
#set $prio_normal = '' #set $prio_high = ''
#set $prio_high = '' #set $prio_veryhigh = ''
#set $prio_veryhigh = '' #set $prio_force = ''
#set $prio_force = '' #if -100 == $sickbeard.NZBGET_PRIORITY:
#elif $sickbeard.NZBGET_PRIORITY == -50: #set $prio_verylow = $html_selected
#set $prio_verylow = '' #elif -50 == $sickbeard.NZBGET_PRIORITY:
#set $prio_low = 'selected="selected"' #set $prio_low = $html_selected
#set $prio_normal = '' #elif 0 == $sickbeard.NZBGET_PRIORITY:
#set $prio_high = '' #set $prio_normal = $html_selected
#set $prio_veryhigh = '' #elif 50 == $sickbeard.NZBGET_PRIORITY:
#set $prio_force = '' #set $prio_high = $html_selected
#elif $sickbeard.NZBGET_PRIORITY == 0: #elif 100 == $sickbeard.NZBGET_PRIORITY:
#set $prio_verylow = '' #set $prio_veryhigh = $html_selected
#set $prio_low = '' #elif 900 == $sickbeard.NZBGET_PRIORITY:
#set $prio_normal = 'selected="selected"' #set $prio_force = $html_selected
#set $prio_high = '' #else:
#set $prio_veryhigh = '' #set $prio_normal = $html_selected
#set $prio_force = '' #end if
#elif $sickbeard.NZBGET_PRIORITY == 50:
#set $prio_verylow = ''
#set $prio_low = ''
#set $prio_normal = ''
#set $prio_high = 'selected="selected"'
#set $prio_veryhigh = ''
#set $prio_force = ''
#elif $sickbeard.NZBGET_PRIORITY == 100:
#set $prio_verylow = ''
#set $prio_low = ''
#set $prio_normal = ''
#set $prio_high = ''
#set $prio_veryhigh = 'selected="selected"'
#set $prio_force = ''
#elif $sickbeard.NZBGET_PRIORITY == 900:
#set $prio_verylow = ''
#set $prio_low = ''
#set $prio_normal = ''
#set $prio_high = ''
#set $prio_veryhigh = ''
#set $prio_force = 'selected="selected"'
#else:
#set $prio_verylow = ''
#set $prio_low = ''
#set $prio_normal = 'selected="selected"'
#set $prio_high = ''
#set $prio_veryhigh = ''
#set $prio_force = ''
#end if
<div class="field-pair"> <div class="field-pair">
<label class="nocheck"> <label>
<span class="component-title">NZBget Priority</span> <span class="component-title">NZBget priority</span>
<span class="component-desc">
<select name="nzbget_priority" id="nzbget_priority" class="form-control input-sm"> <select name="nzbget_priority" id="nzbget_priority" class="form-control input-sm">
<option value="-100" ${prio_verylow}>Very Low</option> <option value="-100"${prio_verylow}>Very low</option>
<option value="-50" ${prio_low}>Low</option> <option value="-50"${prio_low}>Low</option>
<option value="0" ${prio_normal}>Normal</option> <option value="0"${prio_normal}>Normal</option>
<option value="50" ${prio_high}>High</option> <option value="50"${prio_high}>High</option>
<option value="100" ${prio_veryhigh}>Very High</option> <option value="100"${prio_veryhigh}>Very high</option>
<option value="900" ${prio_force}>Force</option> <option value="900"${prio_force}>Force</option>
</select> </select>
</label> <span>priority for daily snatches (no backlog)</span>
<label class="nocheck"> </span>
<span class="component-title">&nbsp;</span>
<span class="component-desc">Priority for daily snatches (no backlog)</span>
</label> </label>
</div> </div>
</div> </div>
<div></div> <div class="testNotification" id="testSABnzbd_result">Click below to test</div>
<div class="testNotification" id="testSABnzbd-result">Click below to test.</div>
<input class="btn" type="button" value="Test SABnzbd" id="testSABnzbd" class="btn test-button"/> <input class="btn" type="button" value="Test SABnzbd" id="testSABnzbd" class="btn test-button"/>
<input type="submit" class="btn config_submitter" value="Save Changes" /><br/> <input type="submit" class="btn config_submitter" value="Save Changes" /><br/>
@ -427,161 +366,153 @@
<div class="component-group-desc"> <div class="component-group-desc">
<h3>Torrent Search</h3> <h3>Torrent Search</h3>
<p>Settings that dictate how SickRage handles Torrent search results.</p> <p>How to handle Torrent search results.</p>
</div> </div>
<fieldset class="component-group-list"> <fieldset class="component-group-list">
<div class="field-pair"> <div class="field-pair">
<input type="checkbox" name="use_torrents" class="enabler" id="use_torrents" #if $sickbeard.USE_TORRENTS == True then "checked=\"checked\"" else ""# />
<label for="use_torrents"> <label for="use_torrents">
<span class="component-title">Search Torrents</span> <span class="component-title">Search torrents</span>
<span class="component-desc">Should SickRage search for torrent files?</span> <span class="component-desc">
<input type="checkbox" name="use_torrents" class="enabler" id="use_torrents" <%= html_checked if sickbeard.USE_TORRENTS == True else '' %>/>
<p>enable torrent search providers</p>
</span>
</label> </label>
</div> </div>
<div id="content_use_torrents"> <div id="content_use_torrents">
<div class="field-pair"> <div class="field-pair">
<label class="nocheck" for="torrent_method"> <label for="torrent_method">
<span class="component-title">TORRENT Method</span> <span class="component-title">Send .torrent files to:</span>
<span class="component-desc"> <span class="component-desc">
<select name="torrent_method" id="torrent_method" class="form-control input-sm"> <select name="torrent_method" id="torrent_method" class="form-control input-sm">
#set $torrent_method_text = {'blackhole': "Black hole", 'utorrent': "uTorrent", 'transmission': "Transmission", 'deluge': "Deluge", 'download_station': "Synology DS", 'rtorrent': "rTorrent"} #set $torrent_method_text = {'blackhole': "Black hole", 'utorrent': "uTorrent", 'transmission': "Transmission", 'deluge': "Deluge", 'download_station': "Synology DS", 'rtorrent': "rTorrent"}
#for $curAction in ('blackhole', 'utorrent', 'transmission', 'deluge', 'download_station', 'rtorrent'): #for $curAction in ('blackhole', 'utorrent', 'transmission', 'deluge', 'download_station', 'rtorrent'):
#if $sickbeard.TORRENT_METHOD == $curAction: #set $selected = $html_selected if $sickbeard.TORRENT_METHOD == $curAction else ''
#set $torrent_method = "selected=\"selected\"" <option value="$curAction"$selected>$torrent_method_text[$curAction]</option>
#else #end for
#set $torrent_method = ""
#end if
<option value="$curAction" $torrent_method>$torrent_method_text[$curAction]</option>
#end for
</select> </select>
</label> </label>
<div id="t_blackhole_settings"> <div id="options_torrent_blackhole">
<div class="field-pair"> <div class="field-pair">
<label class="nocheck"> <label>
<span class="component-title">TORRENT Black Hole</span> <span class="component-title">Black hole folder location</span>
<span class="component-desc">
<input type="text" name="torrent_dir" id="torrent_dir" value="$sickbeard.TORRENT_DIR" class="form-control input-sm input350" /> <input type="text" name="torrent_dir" id="torrent_dir" value="$sickbeard.TORRENT_DIR" class="form-control input-sm input350" />
</label> <div class="clear-left"><p><b>.torrent</b> files are stored at this location for external software to find and use</p></div>
<label class="nocheck"> </span>
<span class="component-title">&nbsp;</span>
<span class="component-desc">The directory where SickRage should store your <i>Torrent</i> files.</span>
</label> </label>
</div> </div>
<div></div> <div></div>
<input type="submit" class="btn config_submitter" value="Save Changes" /><br/> <input type="submit" class="btn config_submitter" value="Save Changes" /><br/>
</div><!-- /content_use_torrents //--> </div>
</div> </div>
<div id="torrent_settings"> <div id="options_torrent_clients">
<div class="field-pair"> <div class="field-pair">
<label class="nocheck"> <label>
<span class="component-title" id="host_desc">Torrent HOST</span> <span class="component-title" id="host_title">Torrent host:port</span>
<span class="component-desc">
<input type="text" name="torrent_host" id="torrent_host" value="$sickbeard.TORRENT_HOST" class="form-control input-sm input350" /> <input type="text" name="torrent_host" id="torrent_host" value="$sickbeard.TORRENT_HOST" class="form-control input-sm input350" />
</label> <div class="clear-left">
<label class="nocheck"> <p id="host_desc_torrent">URL to your torrent client (e.g. http://localhost:8000/)</p>
<span class="component-title">&nbsp;</span> <p id="host_desc_rtorrent" style="display:none"><b>Note:</b> <i>rTorrent</i> client URLs use e.g. scgi://localhost:5000/</p>
<span class="component-desc">URL to your Torrent Client (eg. http://localhost:8000/)</span> </div>
</label> </span>
<label class="nocheck">
<span class="component-title">&nbsp;</span>
<span class="component-desc"><b>Note:</b> <i>rTorrent</i> users need to use scgi://localhost:5000/</span>
</label> </label>
</div> </div>
<div class="field-pair" id="Torrent_Verify_Cert"> <div class="field-pair" id="torrent_verify_cert_option">
<input type="checkbox" name="torrent_verify_cert" class="enabler" id="torrent_verify_cert" #if $sickbeard.TORRENT_VERIFY_CERT == True then "checked=\"checked\"" else ""# /> <label for="torrent_verify_cert">
<label class="nocheck" for="torrent_verify_cert"> <span class="component-title">Verify certificate</span>
<span class="component-title" id="torrent_verify_cert_desc">Verify Certificate</span> <span class="component-desc">
<span class="component-desc">Disable if you get "Deluge: Authentication Error" in your log</span> <input type="checkbox" name="torrent_verify_cert" class="enabler" id="torrent_verify_cert" <%= html_checked if sickbeard.TORRENT_VERIFY_CERT == True else '' %>/>
</label> <p>disable if you get "Deluge: Authentication Error" in your log</p>
</div> </span>
<div class="field-pair" id="Torrent_username">
<label class="nocheck">
<span class="component-title" id="username_desc">Torrent Username</span>
<input type="text" name="torrent_username" id="torrent_username" value="$sickbeard.TORRENT_USERNAME" class="form-control input-sm input200" />
</label>
<label class="nocheck">
<span class="component-title">&nbsp;</span>
<span class="component-desc">Username of your Torrent Client (blank for none)</span>
</label> </label>
</div> </div>
<div class="field-pair"> <div class="field-pair">
<label class="nocheck"> <label>
<span class="component-title" id="password_desc">Torrent Password</span> <span class="component-title" id="username_title">Client username</span>
<span class="component-desc">
<input type="text" name="torrent_username" id="torrent_username" value="$sickbeard.TORRENT_USERNAME" class="form-control input-sm input200" />
<p>(blank for none)</p>
</span>
</label>
</div>
<div class="field-pair">
<label>
<span class="component-title" id="password_title">Client password</span>
<span class="component-desc">
<input type="password" name="torrent_password" id="torrent_password" value="$sickbeard.TORRENT_PASSWORD" class="form-control input-sm input200" /> <input type="password" name="torrent_password" id="torrent_password" value="$sickbeard.TORRENT_PASSWORD" class="form-control input-sm input200" />
</label> <p>(blank for none)</p>
<label class="nocheck"> </span>
<span class="component-title">&nbsp;</span>
<span class="component-desc">Password of your Torrent Client (blank for none)</span>
</label> </label>
</div> </div>
<div class="field-pair" id="Torrent_Label"> <div class="field-pair" id="torrent_label_option">
<label class="nocheck"> <label>
<span class="component-title" id="label_desc">Torrent Label</span> <span class="component-title">Add label to torrent</span>
<span class="component-desc">
<input type="text" name="torrent_label" id="torrent_label" value="$sickbeard.TORRENT_LABEL" class="form-control input-sm input200" /> <input type="text" name="torrent_label" id="torrent_label" value="$sickbeard.TORRENT_LABEL" class="form-control input-sm input200" />
</label> <span id="label_warning_deluge" style="display:none"><p>(blank spaces are not allowed)</p>
<label class="nocheck"> <div class="clear-left"><p>note: label plugin must be enabled in Deluge clients</p></div>
<span class="component-title">&nbsp;</span> </span>
<span class="component-desc">Add a specific label to Torrent</span> </span>
</label>
<label class="nocheck" id="label_warning">
<span class="component-title">&nbsp;</span>
<span class="component-desc"><b>Note:</b> Adds specific warning to Torrent label</span>
</label> </label>
</div> </div>
<div class="field-pair" id="Torrent_Path"> <div class="field-pair" id="torrent_path_option">
<label class="nocheck"> <label>
<span class="component-title" id="directory_desc">Torrent Directory</span> <span class="component-title" id="directory_title">Downloaded files location</span>
<span class="component-desc">
<input type="text" name="torrent_path" id="torrent_path" value="$sickbeard.TORRENT_PATH" class="form-control input-sm input350" /> <input type="text" name="torrent_path" id="torrent_path" value="$sickbeard.TORRENT_PATH" class="form-control input-sm input350" />
</label> <div class="clear-left"><p>where <span id="torrent_client">the torrent client</span> will save downloaded files (blank for client default)
<label class="nocheck"> <span id="path_synology"> <b>note:</b> the destination has to be a shared folder for Synology DS</span></p>
<span class="component-title">&nbsp;</span> </div>
<span class="component-desc">Where should it save the downloaded files? (blank for default)</span> </span>
</label>
<label class="nocheck">
<span class="component-title">&nbsp;</span>
<span class="component-desc"><b>Note:</b> For Synology DS the destination has to be a shared folder</span>
</label> </label>
</div> </div>
<div class="field-pair" id="Torrent_Seed_Time"> <div class="field-pair" id="torrent_seed_time_option">
<label class="nocheck"> <label>
<span class="component-title" id="torrent_seed_time_desc">Seed Time</span> <span class="component-title">Minimum seeding time is</span>
<input type="number" step="0.1" name="torrent_seed_time" id="torrent_seed_time" value="$sickbeard.TORRENT_SEED_TIME" class="form-control input-sm input100" /> <span class="component-desc"><input type="number" step="0.1" name="torrent_seed_time" id="torrent_seed_time" value="$sickbeard.TORRENT_SEED_TIME" class="form-control input-sm input100" />
</label> <p>hours. (default:'0' passes blank to client and '-1' passes nothing)</p></span>
<label class="nocheck">
<span class="component-title">&nbsp;</span>
<span class="component-desc">Duration (in hours) to seed for<br>
(SickRage default '0' passes blank to downloader; '-1' does not set Seed Time)</span>
</label> </label>
</div> </div>
<div class="field-pair" id="Torrent_Paused"> <div class="field-pair" id="torrent_paused_option">
<label class="nocheck"> <label>
<span class="component-title" id="torrent_paused_desc">Start Torrent Paused</span> <span class="component-title">Start torrent paused</span>
<span class="component-desc"><input type="checkbox" name="torrent_paused" class="enabler" id="torrent_paused" #if $sickbeard.TORRENT_PAUSED == True then "checked=\"checked\"" else ""# />Don't start downloading when torrent is added?</span> <span class="component-desc">
<input type="checkbox" name="torrent_paused" class="enabler" id="torrent_paused" <%= html_checked if sickbeard.TORRENT_PAUSED == True else '' %>/>
<p>add .torrent to client but do <b style="font-weight:900">not</b> start downloading</p>
</span>
</label> </label>
</div> </div>
<div class="field-pair" id="Torrent_High_Bandwidth"> <div class="field-pair" id="torrent_high_bandwidth_option">
<label class="nocheck"> <label>
<span class="component-title" id="torrent_high_bandwidth_desc">Allow high bandwidth</span> <span class="component-title">Allow high bandwidth</span>
<span class="component-desc"><input type="checkbox" name="torrent_high_bandwidth" class="enabler" id="torrent_high_bandwidth" #if $sickbeard.TORRENT_HIGH_BANDWIDTH == True then "checked=\"checked\"" else ""# />Use high bandwidth allocation if priority is high?</span> <span class="component-desc">
<input type="checkbox" name="torrent_high_bandwidth" class="enabler" id="torrent_high_bandwidth" <%= html_checked if sickbeard.TORRENT_HIGH_BANDWIDTH == True else '' %>/>
<p>use high bandwidth allocation if priority is high</p>
</span>
</label> </label>
</div> </div>
<div class="testNotification" id="testTorrent-result">Click below to test.</div> <div class="testNotification" id="test_torrent_result">Click below to test</div>
<input class="btn" type="button" value="Test Connection" id="testTorrent" class="btn test-button"/> <input class="btn" type="button" value="Test Connection" id="test_torrent" class="btn test-button"/>
<input type="submit" class="btn config_submitter" value="Save Changes" /><br/> <input type="submit" class="btn config_submitter" value="Save Changes" /><br/>
</div> </div>
</div> </div><!-- /content_use_torrents //-->
</fieldset> </fieldset>
</div><!-- /component-group3 //--> </div><!-- /component-group3 //-->
@ -600,12 +531,11 @@
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
<!-- <!--
jQuery('#config-components').tabs(); jQuery('#config-components').tabs();
jQuery('#nzb_dir').fileBrowser({ title: 'Select NZB Black Hole/Watch Directory' }); jQuery('#nzb_dir').fileBrowser({ title: 'Select .nzb black hole/watch location' });
jQuery('#torrent_dir').fileBrowser({ title: 'Select Torrent Black Hole/Watch Directory' }); jQuery('#torrent_dir').fileBrowser({ title: 'Select .torrent black hole/watch location' });
jQuery('#torrent_path').fileBrowser({ title: 'Select Torrent Download Directory' }); jQuery('#torrent_path').fileBrowser({ title: 'Select .torrent download location' });
jQuery('#tv_download_dir').fileBrowser({ title: 'Select TV Download Directory' }); jQuery('#tv_download_dir').fileBrowser({ title: 'Select TV download location' });
//--> //-->
</script> </script>
#include $os.path.join($sickbeard.PROG_DIR,"gui/slick/interfaces/default/inc_bottom.tmpl") #include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_bottom.tmpl')

View File

@ -1,126 +1,113 @@
$(document).ready(function(){ $(document).ready(function(){
var loading = '<img src="'+sbRoot+'/images/loading16' + themeSpinner + '.gif" height="16" width="16" />'; var loading = '<img src="' + sbRoot + '/images/loading16' + themeSpinner + '.gif" height="16" width="16" />';
function toggle_torrent_title(){ function toggle_torrent_title(){
if ($('#use_torrents').prop('checked')) if ($('#use_torrents').prop('checked'))
$('#no-torrents').show(); $('#no_torrents').show();
else else
$('#no-torrents').hide(); $('#no_torrents').hide();
} }
$.fn.nzb_method_handler = function() { $.fn.nzb_method_handler = function() {
var selectedProvider = $('#nzb_method :selected').val(); var selectedProvider = $('#nzb_method :selected').val(),
blackhole_settings = '#blackhole_settings',
sabnzbd_settings = '#sabnzbd_settings',
testSABnzbd = '#testSABnzbd',
testSABnzbd_result = '#testSABnzbd_result',
nzbget_settings = '#nzbget_settings';
if (selectedProvider == "blackhole") { $(blackhole_settings).hide();
$('#blackhole_settings').show(); $(sabnzbd_settings).hide();
$('#sabnzbd_settings').hide(); $(testSABnzbd).hide();
$('#testSABnzbd').hide(); $(testSABnzbd_result).hide();
$('#testSABnzbd-result').hide(); $(nzbget_settings).hide();
$('#nzbget_settings').hide();
} else if (selectedProvider == "nzbget") { if ('blackhole' == selectedProvider) {
$('#blackhole_settings').hide(); $(blackhole_settings).show();
$('#sabnzbd_settings').hide(); } else if ('nzbget' == selectedProvider) {
$('#testSABnzbd').hide(); $(nzbget_settings).show();
$('#testSABnzbd-result').hide();
$('#nzbget_settings').show();
} else { } else {
$('#blackhole_settings').hide(); $(sabnzbd_settings).show();
$('#sabnzbd_settings').show(); $(testSABnzbd).show();
$('#testSABnzbd').show(); $(testSABnzbd_result).show();
$('#testSABnzbd-result').show();
$('#nzbget_settings').hide();
} }
} }
$.fn.torrent_method_handler = function() { $.fn.torrent_method_handler = function() {
var selectedProvider = $('#torrent_method :selected').val(); $('#options_torrent_clients').hide();
$('#options_torrent_blackhole').hide();
if (selectedProvider == "blackhole") { var selectedProvider = $('#torrent_method :selected').val(),
$('#t_blackhole_settings').show(); host = ' host:port',
$('#torrent_settings').hide(); username = ' username',
} else if (selectedProvider == "utorrent") { password = ' password',
$('#t_blackhole_settings').hide(); label = ' label',
$('#torrent_settings').show(); directory = ' directory',
$('#Torrent_Verify_Cert').hide(); client = '',
$('#Torrent_username').show(); option_panel = '#options_torrent_blackhole';
$('#Torrent_Path').hide();
$('#Torrent_Ratio').show(); if ('blackhole' != selectedProvider) {
$('#Torrent_Seed_Time').show(); var label_warning_deluge = '#label_warning_deluge',
$('#Torrent_High_Bandwidth').hide(); host_desc_rtorrent = '#host_desc_rtorrent',
$('#Torrent_Label').show(); host_desc_torrent = '#host_desc_torrent',
$('#label_warning').text(''); torrent_verify_cert_option = '#torrent_verify_cert_option',
$('#host_desc').text('uTorrent Host'); torrent_path_option = '#torrent_path_option',
$('#username_desc').text('uTorrent Username'); torrent_seed_time_option = '#torrent_seed_time_option',
$('#password_desc').text('uTorrent Password'); torrent_high_bandwidth_option = '#torrent_high_bandwidth_option',
$('#label_desc').text('uTorrent Label'); torrent_label_option = '#torrent_label_option',
} else if (selectedProvider == "transmission"){ path_synology = '#path_synology',
$('#t_blackhole_settings').hide(); torrent_paused_option = '#torrent_paused_option';
$('#torrent_settings').show();
$('#Torrent_Verify_Cert').hide(); $(label_warning_deluge).hide();
$('#Torrent_username').show(); $(host_desc_rtorrent).hide();
$('#Torrent_Path').show(); $(host_desc_torrent).show();
$('#Torrent_Ratio').show(); $(torrent_verify_cert_option).hide();
$('#Torrent_Seed_Time').show(); $(torrent_path_option).show();
$('#Torrent_High_Bandwidth').show(); $(torrent_path_option).find('.fileBrowser').show();
$('#Torrent_Label').hide(); $(torrent_seed_time_option).hide();
$('#host_desc').html('Transmission Host'); $(torrent_high_bandwidth_option).hide();
$('#username_desc').text('Transmission Username'); $(torrent_label_option).show();
$('#password_desc').text('Transmission Password'); $(path_synology).hide();
$('#directory_desc').text('Transmission Directory'); $(torrent_paused_option).show();
} else if (selectedProvider == "deluge"){
$('#t_blackhole_settings').hide(); if ('utorrent' == selectedProvider) {
$('#torrent_settings').show(); client = 'uTorrent';
$('#Torrent_Verify_Cert').show(); $(torrent_path_option).hide();
$('#Torrent_Label').show(); $(torrent_seed_time_option).show();
$('#Torrent_username').show(); } else if ('transmission' == selectedProvider){
$('#Torrent_Path').show(); client = 'Transmission';
$('#Torrent_Ratio').show(); $(torrent_seed_time_option).show();
$('#Torrent_Seed_Time').hide(); $(torrent_high_bandwidth_option).show();
$('#Torrent_High_Bandwidth').hide(); $(torrent_label_option).hide();
$('#host_desc').text('Deluge Host'); //$('#directory_title').text(client + directory);
$('#username_desc').text('Deluge Username'); } else if ('deluge' == selectedProvider){
$('#password_desc').text('Deluge Password'); client = 'Deluge';
$('#label_desc').text('Deluge Label'); $(torrent_verify_cert_option).show();
$('#label_warning').text('Note: Label plugin must be enabled in Deluge client. No blank spaces are allowed in label name'); $(label_warning_deluge).show();
$('#directory_desc').text('Deluge Directory'); //$('#directory_title').text(client + directory);
} else if (selectedProvider == "download_station"){ } else if ('download_station' == selectedProvider){
$('#t_blackhole_settings').hide(); client = 'Synology DS';
$('#torrent_settings').show(); $(torrent_label_option).hide();
$('#Torrent_Verify_Cert').hide(); $('#torrent_paused_option').hide();
$('#Torrent_Label').hide(); $(torrent_path_option).find('.fileBrowser').hide();
$('#Torrent_username').show(); //$('#directory_title').text(client + directory);
$('#Torrent_Paused').hide(); $(path_synology).show();
$('#Torrent_Path').show(); } else if ('rtorrent' == selectedProvider){
$('#Torrent_Ratio').hide(); client = 'rTorrent';
$('#Torrent_Seed_Time').hide(); $(host_desc_torrent).hide();
$('#Torrent_High_Bandwidth').hide(); $(host_desc_rtorrent).show();
$('#host_desc').text('Synology Host'); $(torrent_paused_option).hide();
$('#username_desc').text('Synology Username'); //$('#directory_title').text(client + directory);
$('#password_desc').text('Synology Password');
$('#label_desc').text('Synology Label');
$('#directory_desc').text('Synology Directory');
$('#Torrent_Path').find('.fileBrowser').hide();
} else if (selectedProvider == "rtorrent"){
$('#t_blackhole_settings').hide();
$('#torrent_settings').show();
$('#Torrent_Verify_Cert').hide();
$('#Torrent_Label').show();
$('#Torrent_username').show();
$('#Torrent_Paused').hide();
$('#Torrent_Path').show();
$('#Torrent_Ratio').hide();
$('#Torrent_Seed_Time').hide();
$('#Torrent_High_Bandwidth').hide();
$('#host_desc').text('rTorrent Host');
$('#username_desc').text('rTorrent Username');
$('#password_desc').text('rTorrent Password');
$('#label_desc').text('rTorrent Label');
$('#label_warning').text('');
$('#directory_desc').text('rTorrent Directory');
} }
$('#host_title').text(client + host);
$('#username_title').text(client + username);
$('#password_title').text(client + password);
$('#torrent_client').text(client);
option_panel = '#options_torrent_clients';
}
$(option_panel).show();
} }
$('#nzb_method').change($(this).nzb_method_handler); $('#nzb_method').change($(this).nzb_method_handler);
@ -128,14 +115,14 @@ $(document).ready(function(){
$(this).nzb_method_handler(); $(this).nzb_method_handler();
$('#testSABnzbd').click(function(){ $('#testSABnzbd').click(function(){
$('#testSABnzbd-result').html(loading); $('#testSABnzbd_result').html(loading);
var sab_host = $('#sab_host').val(); var sab_host = $('#sab_host').val();
var sab_username = $('#sab_username').val(); var sab_username = $('#sab_username').val();
var sab_password = $('#sab_password').val(); var sab_password = $('#sab_password').val();
var sab_apiKey = $('#sab_apikey').val(); var sab_apiKey = $('#sab_apikey').val();
$.get(sbRoot+"/home/testSABnzbd", {'host': sab_host, 'username': sab_username, 'password': sab_password, 'apikey': sab_apiKey}, $.get(sbRoot + '/home/testSABnzbd', {'host': sab_host, 'username': sab_username, 'password': sab_password, 'apikey': sab_apiKey},
function (data){ $('#testSABnzbd-result').html(data); }); function (data){ $('#testSABnzbd_result').html(data); });
}); });
@ -147,15 +134,15 @@ $(document).ready(function(){
toggle_torrent_title(); toggle_torrent_title();
}); });
$('#testTorrent').click(function(){ $('#test_torrent').click(function(){
$('#testTorrent-result').html(loading); $('#test_torrent_result').html(loading);
var torrent_method = $('#torrent_method :selected').val(); var torrent_method = $('#torrent_method :selected').val();
var torrent_host = $('#torrent_host').val(); var torrent_host = $('#torrent_host').val();
var torrent_username = $('#torrent_username').val(); var torrent_username = $('#torrent_username').val();
var torrent_password = $('#torrent_password').val(); var torrent_password = $('#torrent_password').val();
$.get(sbRoot+"/home/testTorrent", {'torrent_method': torrent_method, 'host': torrent_host, 'username': torrent_username, 'password': torrent_password}, $.get(sbRoot + '/home/testTorrent', {'torrent_method': torrent_method, 'host': torrent_host, 'username': torrent_username, 'password': torrent_password},
function (data){ $('#testTorrent-result').html(data); }); function (data){ $('#test_torrent_result').html(data); });
}); });
}); });