Fixes issues with skip removed files option.

Fixes issues with saving usenet providers.
This commit is contained in:
echel0n 2014-05-19 16:43:01 -07:00
parent 3918917f7a
commit a4c790eedc
5 changed files with 9 additions and 27 deletions

View file

@ -121,13 +121,6 @@
<span class="component-desc">Set high priority for downloads of recently aired episodes?</span>
</label>
</div>
<div class="field-pair">
<input type="checkbox" name="prefer_episode_releases" id="prefer_episode_releases" #if $sickbeard.PREFER_EPISODE_RELEASES == True then "checked=\"checked\"" else ""# />
<label class="clearfix" for="prefer_episode_releases">
<span class="component title">Prefer episode download</span>
<span class="component-desc">Prefer to download seperate episodes, not complete seasons?</span>
</label>
</div>
<div class="field-pair">
<input type="checkbox" name="dailysearch_startup" id="dailysearch_startup" #if $sickbeard.DAILYSEARCH_STARTUP == True then "checked=\"checked\"" else ""# />
<label class="clearfix" for="dailysearch_startup">

View file

@ -63,12 +63,10 @@ $(document).ready(function(){
}
$.fn.updateProvider = function (id, url, key, search_mode, search_fallback) {
$.fn.updateProvider = function (id, url, key) {
newznabProviders[id][1][1] = url;
newznabProviders[id][1][2] = key;
newznabProviders[id][1][3] = search_mode;
newznabProviders[id][1][4] = search_fallback;
$(this).populateNewznabSection();
@ -299,10 +297,8 @@ $(document).ready(function(){
var url = $('#'+provider_id+'_url').val();
var key = $(this).val();
var search_mode = $('#'+provider_id+'_search_mode').val();
var search_fallback = $('#'+provider_id+'_search_fallback').val();
$(this).updateProvider(provider_id, url, key, search_mode, search_fallback);
$(this).updateProvider(provider_id, url, key);
});
@ -315,10 +311,8 @@ $(document).ready(function(){
var url = $('#newznab_url').val();
var key = $('#newznab_key').val();
var search_mode = 'eponly';
var search_fallback = 0;
$(this).updateProvider(selectedProvider, url, key, search_mode, search_fallback);
$(this).updateProvider(selectedProvider, url, key);
});

View file

@ -180,7 +180,6 @@ TORRENT_METHOD = None
TORRENT_DIR = None
DOWNLOAD_PROPERS = None
CHECK_PROPERS_INTERVAL = None
PREFER_EPISODE_RELEASES = None
ALLOW_HIGH_PRIORITY = None
DAILYSEARCH_FREQUENCY = None
@ -422,7 +421,7 @@ def initialize(consoleLogging=True):
with INIT_LOCK:
global ACTUAL_LOG_DIR, LOG_DIR, WEB_PORT, WEB_LOG, ENCRYPTION_VERSION, WEB_ROOT, WEB_USERNAME, WEB_PASSWORD, WEB_HOST, WEB_IPV6, USE_API, API_KEY, ENABLE_HTTPS, HTTPS_CERT, HTTPS_KEY, \
HANDLE_REVERSE_PROXY, USE_NZBS, USE_TORRENTS, NZB_METHOD, NZB_DIR, DOWNLOAD_PROPERS, CHECK_PROPERS_INTERVAL, PREFER_EPISODE_RELEASES, ALLOW_HIGH_PRIORITY, TORRENT_METHOD, \
HANDLE_REVERSE_PROXY, USE_NZBS, USE_TORRENTS, NZB_METHOD, NZB_DIR, DOWNLOAD_PROPERS, CHECK_PROPERS_INTERVAL, ALLOW_HIGH_PRIORITY, TORRENT_METHOD, \
SAB_USERNAME, SAB_PASSWORD, SAB_APIKEY, SAB_CATEGORY, SAB_HOST, \
NZBGET_USERNAME, NZBGET_PASSWORD, NZBGET_CATEGORY, NZBGET_HOST, NZBGET_USE_HTTPS, backlogSearchScheduler, \
TORRENT_USERNAME, TORRENT_PASSWORD, TORRENT_HOST, TORRENT_PATH, TORRENT_RATIO, TORRENT_SEED_TIME, TORRENT_PAUSED, TORRENT_HIGH_BANDWIDTH, TORRENT_LABEL, TORRENT_VERIFY_CERT, \
@ -598,8 +597,6 @@ def initialize(consoleLogging=True):
if CHECK_PROPERS_INTERVAL not in ('15m', '45m', '90m', '4h', 'daily'):
CHECK_PROPERS_INTERVAL = 'daily'
PREFER_EPISODE_RELEASES = bool(check_setting_int(CFG, 'General', 'prefer_episode_releases', 0))
ALLOW_HIGH_PRIORITY = bool(check_setting_int(CFG, 'General', 'allow_high_priority', 1))
DAILYSEARCH_STARTUP = bool(check_setting_int(CFG, 'General', 'dailysearch_startup', 1))
@ -1322,7 +1319,6 @@ def save_config():
new_config['General']['update_frequency'] = int(UPDATE_FREQUENCY)
new_config['General']['download_propers'] = int(DOWNLOAD_PROPERS)
new_config['General']['check_propers_interval'] = CHECK_PROPERS_INTERVAL
new_config['General']['prefer_episode_releases'] = int(PREFER_EPISODE_RELEASES)
new_config['General']['allow_high_priority'] = int(ALLOW_HIGH_PRIORITY)
new_config['General']['dailysearch_startup'] = int(DAILYSEARCH_STARTUP)
new_config['General']['backlog_startup'] = int(BACKLOG_STARTUP)

View file

@ -940,7 +940,7 @@ class TVShow(object):
os.path.normpath(self.location)):
# check if downloaded files still exist, update our data if this has changed
if not SKIP_REMOVED_FILES:
if not sickbeard.SKIP_REMOVED_FILES:
with curEp.lock:
# if it used to have a file associated with it and it doesn't anymore then set it to IGNORED
if curEp.location and curEp.status in Quality.DOWNLOADED:

View file

@ -1094,8 +1094,8 @@ class ConfigSearch:
sab_apikey=None, sab_category=None, sab_host=None, nzbget_username=None, nzbget_password=None,
nzbget_category=None, nzbget_host=None, nzbget_use_https=None, dailysearch_frequency=None,
nzb_method=None, torrent_method=None, usenet_retention=None, backlog_frequency=None,
download_propers=None, check_propers_interval=None, prefer_episode_releases=None, allow_high_priority=None,
backlog_startup=None, dailysearch_startup=None, skip_removed_files=None,
download_propers=None, check_propers_interval=None, allow_high_priority=None,
backlog_startup=None, dailysearch_startup=None,
torrent_dir=None, torrent_username=None, torrent_password=None, torrent_host=None,
torrent_label=None, torrent_path=None, torrent_verify_cert=None,
torrent_ratio=None, torrent_seed_time=None, torrent_paused=None, torrent_high_bandwidth=None, ignore_words=None):
@ -1127,12 +1127,10 @@ class ConfigSearch:
sickbeard.properFinderScheduler.silent = True
sickbeard.CHECK_PROPERS_INTERVAL = check_propers_interval
sickbeard.PREFER_EPISODE_RELEASES = config.checkbox_to_value(prefer_episode_releases)
sickbeard.ALLOW_HIGH_PRIORITY = config.checkbox_to_value(allow_high_priority)
sickbeard.DAILYSEARCH_STARTUP = config.checkbox_to_value(dailysearch_startup)
sickbeard.BACKLOG_STARTUP = config.checkbox_to_value(backlog_startup)
sickbeard.SKIP_REMOVED_FILES = config.checkbox_to_value(skip_removed_files)
sickbeard.SAB_USERNAME = sab_username
sickbeard.SAB_PASSWORD = sab_password
@ -1221,6 +1219,7 @@ class ConfigPostProcessing:
sickbeard.NAMING_STRIP_YEAR = config.checkbox_to_value(naming_strip_year)
sickbeard.USE_FAILED_DOWNLOADS = config.checkbox_to_value(use_failed_downloads)
sickbeard.DELETE_FAILED = config.checkbox_to_value(delete_failed)
sickbeard.SKIP_REMOVED_FILES = config.checkbox_to_value(skip_removed_files)
sickbeard.METADATA_XBMC = xbmc_data
sickbeard.METADATA_XBMC_12PLUS = xbmc_12plus_data