mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-12 11:02:21 -05:00
add checkbox to control proxying indexers
This commit is contained in:
parent
f9e07ff931
commit
5aae8d7b48
@ -419,6 +419,13 @@
|
||||
<span class="component-desc">Proxy to use for connecting to providers. Leave empty to not use proxy.</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="field-pair">
|
||||
<input type="checkbox" name="proxy_indexers" id="proxy_indexers" #if $sickbeard.PROXY_INDEXERS == True then "checked=\"checked\"" else ""#/>
|
||||
<label class="clearfix" for="proxy_indexers">
|
||||
<span class="component-title">Proxy Indexers</span>
|
||||
<span class="component-desc">Use the proxy for connecting to indexers (thetvdb, tvrage)</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<input type="submit" class="btn config_submitter" value="Save Changes" />
|
||||
</fieldset>
|
||||
|
@ -127,6 +127,7 @@ PLAY_VIDEOS = False
|
||||
|
||||
HANDLE_REVERSE_PROXY = False
|
||||
PROXY_SETTING = None
|
||||
PROXY_INDEXERS = True
|
||||
|
||||
LOCALHOST_IP = None
|
||||
|
||||
@ -498,7 +499,7 @@ def initialize(consoleLogging=True):
|
||||
GUI_NAME, HOME_LAYOUT, HISTORY_LAYOUT, DISPLAY_SHOW_SPECIALS, COMING_EPS_LAYOUT, COMING_EPS_SORT, COMING_EPS_DISPLAY_PAUSED, COMING_EPS_MISSED_RANGE, FUZZY_DATING, TRIM_ZERO, DATE_PRESET, TIME_PRESET, TIME_PRESET_W_SECONDS, THEME_NAME, \
|
||||
METADATA_WDTV, METADATA_TIVO, METADATA_MEDE8ER, IGNORE_WORDS, REQUIRE_WORDS, CALENDAR_UNPROTECTED, CREATE_MISSING_SHOW_DIRS, \
|
||||
ADD_SHOWS_WO_DIR, USE_SUBTITLES, SUBTITLES_LANGUAGES, SUBTITLES_DIR, SUBTITLES_SERVICES_LIST, SUBTITLES_SERVICES_ENABLED, SUBTITLES_HISTORY, SUBTITLES_FINDER_FREQUENCY, subtitlesFinderScheduler, \
|
||||
USE_FAILED_DOWNLOADS, DELETE_FAILED, ANON_REDIRECT, LOCALHOST_IP, TMDB_API_KEY, DEBUG, PROXY_SETTING, \
|
||||
USE_FAILED_DOWNLOADS, DELETE_FAILED, ANON_REDIRECT, LOCALHOST_IP, TMDB_API_KEY, DEBUG, PROXY_SETTING, PROXY_INDEXERS, \
|
||||
AUTOPOSTPROCESSER_FREQUENCY, DEFAULT_AUTOPOSTPROCESSER_FREQUENCY, MIN_AUTOPOSTPROCESSER_FREQUENCY, \
|
||||
ANIME_DEFAULT, NAMING_ANIME, ANIMESUPPORT, USE_ANIDB, ANIDB_USERNAME, ANIDB_PASSWORD, ANIDB_USE_MYLIST, \
|
||||
ANIME_SPLIT_HOME, SCENE_DEFAULT, PLAY_VIDEOS, BACKLOG_DAYS
|
||||
@ -597,6 +598,7 @@ def initialize(consoleLogging=True):
|
||||
|
||||
ANON_REDIRECT = check_setting_str(CFG, 'General', 'anon_redirect', 'http://dereferer.org/?')
|
||||
PROXY_SETTING = check_setting_str(CFG, 'General', 'proxy_setting', '')
|
||||
PROXY_INDEXERS = bool(check_setting_str(CFG, 'General', 'proxy_indexers', 1))
|
||||
# attempt to help prevent users from breaking links by using a bad url
|
||||
if not ANON_REDIRECT.endswith('?'):
|
||||
ANON_REDIRECT = ''
|
||||
@ -1439,6 +1441,7 @@ def save_config():
|
||||
new_config['General']['update_shows_on_start'] = int(UPDATE_SHOWS_ON_START)
|
||||
new_config['General']['sort_article'] = int(SORT_ARTICLE)
|
||||
new_config['General']['proxy_setting'] = PROXY_SETTING
|
||||
new_config['General']['proxy_indexers'] = int(PROXY_INDEXERS)
|
||||
|
||||
new_config['General']['use_listview'] = int(USE_LISTVIEW)
|
||||
new_config['General']['metadata_xbmc'] = METADATA_XBMC
|
||||
|
@ -48,7 +48,7 @@ class indexerApi(object):
|
||||
if self.indexerID:
|
||||
if sickbeard.CACHE_DIR:
|
||||
indexerConfig[self.indexerID]['api_params']['cache'] = os.path.join(sickbeard.CACHE_DIR, 'indexers', self.name)
|
||||
if sickbeard.PROXY_SETTING:
|
||||
if sickbeard.PROXY_SETTING and sickbeard.PROXY_INDEXERS:
|
||||
indexerConfig[self.indexerID]['api_params']['proxy'] = sickbeard.PROXY_SETTING
|
||||
|
||||
return indexerConfig[self.indexerID]['api_params']
|
||||
@ -60,4 +60,4 @@ class indexerApi(object):
|
||||
|
||||
@property
|
||||
def indexers(self):
|
||||
return dict((int(x['id']), x['name']) for x in indexerConfig.values())
|
||||
return dict((int(x['id']), x['name']) for x in indexerConfig.values())
|
||||
|
@ -1486,7 +1486,7 @@ class ConfigGeneral(MainHandler):
|
||||
use_api=None, api_key=None, indexer_default=None, timezone_display=None, cpu_preset=None,
|
||||
web_password=None, version_notify=None, enable_https=None, https_cert=None, https_key=None,
|
||||
handle_reverse_proxy=None, sort_article=None, auto_update=None, notify_on_update=None,
|
||||
proxy_setting=None, anon_redirect=None, git_path=None, calendar_unprotected=None,
|
||||
proxy_setting=None, proxy_indexers=None, anon_redirect=None, git_path=None, calendar_unprotected=None,
|
||||
fuzzy_dating=None, trim_zero=None, date_preset=None, date_preset_na=None, time_preset=None,
|
||||
indexer_timeout=None, play_videos=None, rootDir=None, use_imdbwl=None, imdbWatchlistCsv=None, theme_name=None):
|
||||
|
||||
@ -1508,6 +1508,7 @@ class ConfigGeneral(MainHandler):
|
||||
sickbeard.CPU_PRESET = cpu_preset
|
||||
sickbeard.ANON_REDIRECT = anon_redirect
|
||||
sickbeard.PROXY_SETTING = proxy_setting
|
||||
sickbeard.PROXY_INDEXERS = config.checkbox_to_value(proxy_indexers)
|
||||
sickbeard.GIT_PATH = git_path
|
||||
sickbeard.CALENDAR_UNPROTECTED = config.checkbox_to_value(calendar_unprotected)
|
||||
# sickbeard.LOG_DIR is set in config.change_LOG_DIR()
|
||||
|
Loading…
Reference in New Issue
Block a user