mirror of
https://github.com/moparisthebest/SickRage
synced 2024-11-17 06:45:05 -05:00
fb71c6139e
Fixed issue #417 and #335
400 lines
23 KiB
Cheetah
400 lines
23 KiB
Cheetah
#import os.path
|
|
#import datetime
|
|
#import locale
|
|
#import sickbeard
|
|
#from sickbeard.common import *
|
|
#from sickbeard.sbdatetime import *
|
|
#from sickbeard import config
|
|
#from sickbeard import metadata
|
|
#from sickbeard.metadata.generic import GenericMetadata
|
|
#set global $title = "Config - General"
|
|
#set global $header = "General Configuration"
|
|
|
|
#set global $sbPath="../.."
|
|
|
|
#set global $topmenu="config"#
|
|
#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl")
|
|
#if $varExists('header')
|
|
<h1 class="header">$header</h1>
|
|
#else
|
|
<h1 class="title">$title</h1>
|
|
#end if
|
|
|
|
#set $indexer = 0
|
|
#if $sickbeard.INDEXER_DEFAULT
|
|
#set $indexer = $sickbeard.INDEXER_DEFAULT
|
|
#end if
|
|
|
|
<script type="text/javascript" src="$sbRoot/js/config.js?$sbPID"></script>
|
|
|
|
<div id="config">
|
|
<div id="config-content">
|
|
|
|
<form id="configForm" action="saveGeneral" method="post">
|
|
<div id="config-components">
|
|
|
|
<ul>
|
|
<li><a href="#core-component-group1">Misc</a></li>
|
|
<li><a href="#core-component-group2">Web Interface</a></li>
|
|
<li><a href="#core-component-group3">Date and Time</a></li>
|
|
<li><a href="#core-component-group4">Advanced Setting</a></li>
|
|
</ul>
|
|
|
|
<div id="core-component-group1" class="component-group clearfix">
|
|
|
|
<div class="component-group-desc">
|
|
<h3>Misc</h3>
|
|
<p>Startup options.</p>
|
|
<p><b>Some options may require a manual restart to take effect.</b></p>
|
|
</div>
|
|
|
|
<fieldset class="component-group-list">
|
|
<div class="field-pair">
|
|
<input type="checkbox" name="launch_browser" id="launch_browser" #if $sickbeard.LAUNCH_BROWSER then "checked=\"checked\"" else ""#/>
|
|
<label class="clearfix" for="launch_browser">
|
|
<span class="component-title">Launch Browser</span>
|
|
<span class="component-desc">Should Sick Beard open its home page when started?</span>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="field-pair">
|
|
<input type="checkbox" name="update_shows_on_start" id="update_shows_on_start" #if $sickbeard.UPDATE_SHOWS_ON_START then "checked=\"checked\"" else ""#/>
|
|
<label class="clearfix" for="update_shows_on_start">
|
|
<span class="component-title">Update Shows on Start</span>
|
|
<span class="component-desc">Should Sick Beard update shows info when started?</span>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="field-pair">
|
|
<input type="checkbox" name="version_notify" id="version_notify" #if $sickbeard.VERSION_NOTIFY then "checked=\"checked\"" else ""#/>
|
|
<label class="clearfix" for="version_notify">
|
|
<span class="component-title">Check for Update</span>
|
|
<span class="component-desc">Show notification about updates for Sick Beard if available.</span>
|
|
</label>
|
|
<label class="nocheck clearfix">
|
|
<span class="component-title"> </span>
|
|
<span class="component-desc">Checking for updates runs on startup and on the interval specified below.</span>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="field-pair">
|
|
<label class="nocheck clearfix">
|
|
<span class="component-title">Update Frequency</span>
|
|
<input type="text" name="update_frequency" id="update_frequency" value="$sickbeard.UPDATE_FREQUENCY" size="5" />
|
|
</label>
|
|
<label class="nocheck clearfix">
|
|
<span class="component-title"> </span>
|
|
<span class="component-desc">Time in hours to check for software updates (eg. 12)</span>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="field-pair">
|
|
<input type="checkbox" name="auto_update" id="auto_update" #if $sickbeard.AUTO_UPDATE then "checked=\"checked\"" else ""#/>
|
|
<label class="clearfix" for="auto_update">
|
|
<span class="component-title">Automatic Updates</span>
|
|
<span class="component-desc">Automatically get and install updates for Sick Beard when available.</span>
|
|
</label>
|
|
<label class="nocheck clearfix">
|
|
<span class="component-title"> </span>
|
|
<span class="component-desc">Automatic Updates run on startup and in the background on the interval specified above.</span>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="field-pair">
|
|
<input type="checkbox" name="sort_article" id="sort_article" #if $sickbeard.SORT_ARTICLE then "checked=\"checked\"" else ""#/>
|
|
<label class="clearfix" for="sort_article">
|
|
<span class="component-title">Sort articles</span>
|
|
<span class="component-desc">Include articles (The, A, An) when sorting show lists.</span>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="field-pair">
|
|
<label class="nocheck clearfix" for="indexer_default">
|
|
<span class="component-title">Default Indexer:</span>
|
|
<span class="component-desc">
|
|
<select id="indexer_default" name="indexer_default">
|
|
<option value="0" #if $indexer == 0 then "selected=\"selected\"" else ""#>All Indexers</option>
|
|
#for $indexer in $sickbeard.indexerApi().indexers
|
|
<option value="$indexer" #if $indexer == $sickbeard.INDEXER_DEFAULT then "selected=\"selected\"" else ""#>$sickbeard.indexerApi().indexers[$indexer]</option>
|
|
#end for
|
|
</select>
|
|
</span>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="field-pair">
|
|
<label class="nocheck clearfix" for="log_dir">
|
|
<span class="component-title">Logging Directory</span>
|
|
<input type="text" name="log_dir" id="log_dir" value="$sickbeard.ACTUAL_LOG_DIR" size="40" />
|
|
</label>
|
|
</div>
|
|
|
|
<div class="field-pair">
|
|
<input type="checkbox" name="handle_reverse_proxy" id="handle_reverse_proxy" #if $sickbeard.HANDLE_REVERSE_PROXY then "checked=\"checked\"" else ""#/>
|
|
<label class="clearfix" for="handle_reverse_proxy">
|
|
<span class="component-title">Handle reverse proxies</span>
|
|
<span class="component-desc">Should Sick Beard accept reverse proxy headers? (X-Forwarded-Host, X-Forwarded-For, X-Forwarded-Proto)</span>
|
|
</label>
|
|
</div>
|
|
|
|
<input type="submit" class="btn config_submitter" value="Save Changes" />
|
|
</fieldset>
|
|
</div><!-- /component-group1 //-->
|
|
|
|
|
|
<div id="core-component-group2" class="component-group clearfix">
|
|
|
|
<div class="component-group-desc">
|
|
<h3>Web Interface</h3>
|
|
<p>It is recommended that you enable a username and password to secure Sick Beard from being tampered with remotely.</p>
|
|
<p><b>These options require a manual restart to take effect.</b></p>
|
|
</div>
|
|
|
|
<fieldset class="component-group-list">
|
|
|
|
<div class="field-pair">
|
|
<input type="checkbox" name="web_ipv6" id="web_ipv6" #if $sickbeard.WEB_IPV6 then "checked=\"checked\"" else ""#/>
|
|
<label class="clearfix" for="web_ipv6">
|
|
<span class="component-title">Listen on IPv6</span>
|
|
<span class="component-desc">Allow Sick Beard to bind to any available IPv6 address?</span>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="field-pair">
|
|
<input type="checkbox" name="web_log" id="web_log" #if $sickbeard.WEB_LOG then "checked=\"checked\"" else ""#/>
|
|
<label class="clearfix" for="web_log">
|
|
<span class="component-title">HTTP Logs</span>
|
|
<span class="component-desc">Have Sick Beard's web server (cherrypy) generate logs?</span>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="field-pair">
|
|
<label class="nocheck clearfix">
|
|
<span class="component-title">HTTP Port</span>
|
|
<input type="text" name="web_port" value="$sickbeard.WEB_PORT" size="10" />
|
|
</label>
|
|
<label class="nocheck clearfix">
|
|
<span class="component-title"> </span>
|
|
<span class="component-desc">Web port that Sick Beard should listen on (eg. 8081)</span>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="field-pair">
|
|
<label class="nocheck clearfix">
|
|
<span class="component-title">HTTP Username</span>
|
|
<input type="text" name="web_username" value="$sickbeard.WEB_USERNAME" size="35" />
|
|
</label>
|
|
<label class="nocheck clearfix">
|
|
<span class="component-title"> </span>
|
|
<span class="component-desc">Username for authentication (blank for none)</span>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="field-pair">
|
|
<label class="nocheck clearfix">
|
|
<span class="component-title">HTTP Password</span>
|
|
<input type="password" name="web_password" value="$sickbeard.WEB_PASSWORD" size="35" />
|
|
</label>
|
|
<label class="nocheck clearfix">
|
|
<span class="component-title"> </span>
|
|
<span class="component-desc">Password for authentication (blank for none)</span>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="field-pair">
|
|
<label class="clearfix">
|
|
<input type="checkbox" name="enable_https" class="enabler" id="enable_https" #if $sickbeard.ENABLE_HTTPS then "checked=\"checked\"" else ""#/>
|
|
<span class="component-title">Enable HTTPS</span>
|
|
<span class="component-desc">Enable accessing the interface from a HTTPS address.</span>
|
|
</label>
|
|
</div>
|
|
|
|
<div id="content_enable_https">
|
|
<div class="field-pair">
|
|
<label class="nocheck clearfix">
|
|
<span class="component-title">HTTPS Certificate</span>
|
|
<input type="text" name="https_cert" value="$sickbeard.HTTPS_CERT" size="35" />
|
|
</label>
|
|
<label class="nocheck clearfix">
|
|
<span class="component-title"> </span>
|
|
<span class="component-desc">File name or path to HTTPS Certificate.</span>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="field-pair">
|
|
<label class="nocheck clearfix">
|
|
<span class="component-title">HTTPS Key</span>
|
|
<input type="text" name="https_key" value="$sickbeard.HTTPS_KEY" size="35" />
|
|
</label>
|
|
<label class="nocheck clearfix">
|
|
<span class="component-title"> </span>
|
|
<span class="component-desc">File name or path to HTTPS Key.</span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<input type="submit" class="btn config_submitter" value="Save Changes" />
|
|
</fieldset>
|
|
</div><!-- /component-group2 //-->
|
|
|
|
<div id="core-component-group4" class="component-group clearfix">
|
|
|
|
<div class="component-group-desc">
|
|
<h3>Advanced setting</h3>
|
|
<p>You need to know what you are doing here!!!</p>
|
|
</div>
|
|
|
|
<fieldset class="component-group-list">
|
|
<div class="field-pair">
|
|
<label class="nocheck clearfix">
|
|
<span class="component-title">Anonymous Redirect</span>
|
|
<input type="text" name="anon_redirect" value="$sickbeard.ANON_REDIRECT" size="40" />
|
|
</label>
|
|
<label class="nocheck clearfix">
|
|
<span class="component-title"> </span>
|
|
<span class="component-desc">Backlink protection via anonymizer service, must end in <b>?</b></span>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="field-pair">
|
|
<label class="nocheck clearfix">
|
|
<span class="component-title">Git Path</span>
|
|
<input type="text" name="git_path" value="$sickbeard.GIT_PATH" size="40" />
|
|
</label>
|
|
<label class="nocheck clearfix">
|
|
<span class="component-title"> </span>
|
|
<span class="component-desc">Specify path to Git binary, only use if OS is unable to find the path.</span>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="field-pair">
|
|
<input type="checkbox" name="use_api" class="enabler" id="use_api" #if $sickbeard.USE_API then "checked=\"checked\"" else ""#/>
|
|
<label class="clearfix" for="use_api">
|
|
<span class="component-title">Enable API</span>
|
|
<span class="component-desc">Allow the use of the Sick-Beard API.</span>
|
|
</label>
|
|
</div>
|
|
|
|
<div id="content_use_api">
|
|
<div class="field-pair">
|
|
<label class="nocheck clearfix" for="api_key">
|
|
<span class="component-title">API Key</span>
|
|
<input type="text" name="api_key" id="api_key" value="$sickbeard.API_KEY" size="35" readonly="readonly" />
|
|
<input class="btn" class="btn" type="button" id="generate_new_apikey" value="Generate">
|
|
</label>
|
|
<label class="nocheck clearfix">
|
|
<span class="component-title"> </span>
|
|
<span class="component-desc">Used to give 3rd party programs limited access to Sick-Beard.</span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="field-pair">
|
|
<input type="checkbox" name="encryption_version" id="encryption_version" #if $sickbeard.ENCRYPTION_VERSION then "checked=\"checked\"" else ""#/>
|
|
<label class="clearfix" for="encryption_version">
|
|
<span class="component-title">Encrypt Passwords</span>
|
|
<span class="component-desc">Should Sick Beard encrypt the passwords in <code>config.ini</code> file?</span>
|
|
</label>
|
|
<label class="nocheck clearfix">
|
|
<span class="component-title"> </span>
|
|
<span class="component-desc"><b>Warning</b>: Password must be only with <a style="color: blue;" href="http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters">ASCII characters</a></span>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="field-pair">
|
|
<input type="checkbox" name="calendar_unprotected" id="calendar_unprotected" #if $sickbeard.CALENDAR_UNPROTECTED then "checked=\"checked\"" else ""#/>
|
|
<label class="clearfix" for="calendar_unprotected">
|
|
<span class="component-title">Unprotected Calendar</span>
|
|
<span class="component-desc">This allows to subscribe to the calendar without user and password.</span>
|
|
</label>
|
|
<label class="nocheck clearfix">
|
|
<span class="component-title"> </span>
|
|
<span class="component-desc">Some services like Google Calendar only work this way.</span>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="field-pair">
|
|
<label class="nocheck clearfix">
|
|
<span class="component-title">Proxy Settings</span>
|
|
<input type="text" name="proxy_setting" value="$sickbeard.PROXY_SETTING" size="40" />
|
|
</label>
|
|
<label class="nocheck clearfix">
|
|
<span class="component-title"> </span>
|
|
<span class="component-desc">Proxy to use for connecting to providers. Leave empty to not use proxy</b></span>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="field-pair">
|
|
<label class="nocheck clearfix">
|
|
<span class="component-title">Multi-Threading</span>
|
|
<input type="text" name="num_of_threads" id="num_of_threads" value="$sickbeard.NUM_OF_THREADS" size="5" />
|
|
</label>
|
|
<label class="nocheck clearfix">
|
|
<span class="component-title"> </span>
|
|
<span class="component-desc">Number of threads to assign, the more threads the faster SickRage goes if your hardware can handle it! (eg. 1)</span>
|
|
</label>
|
|
</div>
|
|
<input type="submit" class="btn config_submitter" value="Save Changes" />
|
|
</fieldset>
|
|
</div><!-- /component-group4 //-->
|
|
|
|
<div id="core-component-group3" class="component-group clearfix">
|
|
|
|
<div class="component-group-desc">
|
|
<h3>Date and Time</h3>
|
|
</div>
|
|
|
|
<fieldset class="component-group-list">
|
|
|
|
<div class="field-pair">
|
|
<label class="nocheck clearfix" for="date_presets">
|
|
<span class="component-title">Date Format:</span>
|
|
<span class="component-desc">
|
|
<select id="date_presets" name="date_preset">
|
|
<option value="%x" #if "%x" == $sickbeard.DATE_PRESET then "selected=\"selected\"" else ""#>Use System Default</option>
|
|
#for $cur_preset in $date_presets:
|
|
<option value="$cur_preset" #if $cur_preset == $sickbeard.DATE_PRESET then "selected=\"selected\"" else ""#>$datetime.datetime.now().strftime($cur_preset)</option>
|
|
#end for
|
|
</select>
|
|
</span>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="field-pair">
|
|
<label class="nocheck clearfix" for="time_presets">
|
|
<span class="component-title">Time Format:</span>
|
|
<span class="component-desc">
|
|
<select id="time_presets" name="time_preset">
|
|
#for $cur_preset in $time_presets:
|
|
<option value="$cur_preset" #if $cur_preset == $sickbeard.TIME_PRESET_W_SECONDS then "selected=\"selected\"" else ""#>$sbdatetime.now().sbftime(show_seconds=True,t_preset=$cur_preset)</option>
|
|
#end for
|
|
</select>
|
|
<b>Note:</b> Seconds are only shown on the History Page.
|
|
</span>
|
|
</label>
|
|
</div>
|
|
|
|
<input type="submit" class="btn config_submitter" value="Save Changes" />
|
|
</fieldset>
|
|
</div><!-- /component-group3 //-->
|
|
|
|
<br/>
|
|
<small class="float-right"><b>All non-absolute folder locations are relative to <span class="path">$sickbeard.DATA_DIR</span></b> </small>
|
|
<input type="submit" class="btn config_submitter button" value="Save Changes" />
|
|
|
|
</div><!-- /config-components -->
|
|
|
|
</form>
|
|
</div></div>
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
<script type="text/javascript" charset="utf-8">
|
|
<!--
|
|
jQuery('#log_dir').fileBrowser({ title: 'Select Log Directory' });
|
|
jQuery('#config-components').tabs();
|
|
//-->
|
|
</script>
|
|
|
|
#include $os.path.join($sickbeard.PROG_DIR,"gui/slick/interfaces/default/inc_bottom.tmpl")
|