mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-07 02:23:38 +00:00
Added in CPU Throttling option under general config -> advanced.
Fixed issues with passwords and unicode chars. Fixed issue with usenet_retention variable not being saved or set.
This commit is contained in:
parent
0b9b6228ae
commit
a3e06b965f
21 changed files with 110 additions and 82 deletions
|
@ -245,6 +245,20 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<fieldset class="component-group-list">
|
<fieldset class="component-group-list">
|
||||||
|
|
||||||
|
<div class="field-pair">
|
||||||
|
<label class="nocheck clearfix" for="cpu_presets">
|
||||||
|
<span class="component-title">CPU Throttling:</span>
|
||||||
|
<span class="component-desc">
|
||||||
|
<select id="cpu_presets" name="cpu_preset">
|
||||||
|
#for $cur_preset in $cpu_presets:
|
||||||
|
<option value="$cur_preset" #if $cur_preset == $sickbeard.CPU_PRESET then "selected=\"selected\"" else ""#>$cur_preset</option>
|
||||||
|
#end for
|
||||||
|
</select>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="field-pair">
|
<div class="field-pair">
|
||||||
<label class="nocheck clearfix">
|
<label class="nocheck clearfix">
|
||||||
<span class="component-title">Anonymous Redirect</span>
|
<span class="component-title">Anonymous Redirect</span>
|
||||||
|
|
|
@ -122,9 +122,13 @@ WEB_PASSWORD = None
|
||||||
WEB_HOST = None
|
WEB_HOST = None
|
||||||
WEB_IPV6 = None
|
WEB_IPV6 = None
|
||||||
|
|
||||||
|
HANDLE_REVERSE_PROXY = None
|
||||||
PROXY_SETTING = None
|
PROXY_SETTING = None
|
||||||
|
|
||||||
LOCALHOST_IP = None
|
LOCALHOST_IP = None
|
||||||
|
|
||||||
|
CPU_PRESET = None
|
||||||
|
|
||||||
ANON_REDIRECT = None
|
ANON_REDIRECT = None
|
||||||
|
|
||||||
USE_API = False
|
USE_API = False
|
||||||
|
@ -436,7 +440,7 @@ def initialize(consoleLogging=True):
|
||||||
USE_NMA, NMA_NOTIFY_ONSNATCH, NMA_NOTIFY_ONDOWNLOAD, NMA_NOTIFY_ONSUBTITLEDOWNLOAD, NMA_API, NMA_PRIORITY, \
|
USE_NMA, NMA_NOTIFY_ONSNATCH, NMA_NOTIFY_ONDOWNLOAD, NMA_NOTIFY_ONSUBTITLEDOWNLOAD, NMA_API, NMA_PRIORITY, \
|
||||||
USE_PUSHALOT, PUSHALOT_NOTIFY_ONSNATCH, PUSHALOT_NOTIFY_ONDOWNLOAD, PUSHALOT_NOTIFY_ONSUBTITLEDOWNLOAD, PUSHALOT_AUTHORIZATIONTOKEN, \
|
USE_PUSHALOT, PUSHALOT_NOTIFY_ONSNATCH, PUSHALOT_NOTIFY_ONDOWNLOAD, PUSHALOT_NOTIFY_ONSUBTITLEDOWNLOAD, PUSHALOT_AUTHORIZATIONTOKEN, \
|
||||||
USE_PUSHBULLET, PUSHBULLET_NOTIFY_ONSNATCH, PUSHBULLET_NOTIFY_ONDOWNLOAD, PUSHBULLET_NOTIFY_ONSUBTITLEDOWNLOAD, PUSHBULLET_API, PUSHBULLET_DEVICE, \
|
USE_PUSHBULLET, PUSHBULLET_NOTIFY_ONSNATCH, PUSHBULLET_NOTIFY_ONDOWNLOAD, PUSHBULLET_NOTIFY_ONSUBTITLEDOWNLOAD, PUSHBULLET_API, PUSHBULLET_DEVICE, \
|
||||||
versionCheckScheduler, VERSION_NOTIFY, AUTO_UPDATE, PROCESS_AUTOMATICALLY, UNPACK, \
|
versionCheckScheduler, VERSION_NOTIFY, AUTO_UPDATE, PROCESS_AUTOMATICALLY, UNPACK, CPU_PRESET, \
|
||||||
KEEP_PROCESSED_DIR, PROCESS_METHOD, TV_DOWNLOAD_DIR, MIN_SEARCH_FREQUENCY, DEFAULT_UPDATE_FREQUENCY, MIN_UPDATE_FREQUENCY, UPDATE_FREQUENCY, \
|
KEEP_PROCESSED_DIR, PROCESS_METHOD, TV_DOWNLOAD_DIR, MIN_SEARCH_FREQUENCY, DEFAULT_UPDATE_FREQUENCY, MIN_UPDATE_FREQUENCY, UPDATE_FREQUENCY, \
|
||||||
showQueueScheduler, searchQueueScheduler, ROOT_DIRS, CACHE_DIR, ACTUAL_CACHE_DIR, TIMEZONE_DISPLAY, \
|
showQueueScheduler, searchQueueScheduler, ROOT_DIRS, CACHE_DIR, ACTUAL_CACHE_DIR, TIMEZONE_DISPLAY, \
|
||||||
NAMING_PATTERN, NAMING_MULTI_EP, NAMING_FORCE_FOLDERS, NAMING_ABD_PATTERN, NAMING_CUSTOM_ABD, NAMING_SPORTS_PATTERN, NAMING_CUSTOM_SPORTS, NAMING_STRIP_YEAR, \
|
NAMING_PATTERN, NAMING_MULTI_EP, NAMING_FORCE_FOLDERS, NAMING_ABD_PATTERN, NAMING_CUSTOM_ABD, NAMING_SPORTS_PATTERN, NAMING_CUSTOM_SPORTS, NAMING_STRIP_YEAR, \
|
||||||
|
@ -509,6 +513,9 @@ def initialize(consoleLogging=True):
|
||||||
LAUNCH_BROWSER = bool(check_setting_int(CFG, 'General', 'launch_browser', 1))
|
LAUNCH_BROWSER = bool(check_setting_int(CFG, 'General', 'launch_browser', 1))
|
||||||
|
|
||||||
LOCALHOST_IP = check_setting_str(CFG, 'General', 'localhost_ip', '')
|
LOCALHOST_IP = check_setting_str(CFG, 'General', 'localhost_ip', '')
|
||||||
|
|
||||||
|
CPU_PRESET = check_setting_str(CFG, 'General', 'cpu_preset', 'NORMAL')
|
||||||
|
|
||||||
ANON_REDIRECT = check_setting_str(CFG, 'General', 'anon_redirect', 'http://dereferer.org/?')
|
ANON_REDIRECT = check_setting_str(CFG, 'General', 'anon_redirect', 'http://dereferer.org/?')
|
||||||
PROXY_SETTING = check_setting_str(CFG, 'General', 'proxy_setting', '')
|
PROXY_SETTING = check_setting_str(CFG, 'General', 'proxy_setting', '')
|
||||||
# attempt to help prevent users from breaking links by using a bad url
|
# attempt to help prevent users from breaking links by using a bad url
|
||||||
|
@ -988,65 +995,52 @@ def initialize(consoleLogging=True):
|
||||||
for curTorrentProvider in [curProvider for curProvider in providers.sortedProviderList() if
|
for curTorrentProvider in [curProvider for curProvider in providers.sortedProviderList() if
|
||||||
curProvider.providerType == GenericProvider.TORRENT]:
|
curProvider.providerType == GenericProvider.TORRENT]:
|
||||||
curTorrentProvider.enabled = bool(check_setting_int(CFG, curTorrentProvider.getID().upper(),
|
curTorrentProvider.enabled = bool(check_setting_int(CFG, curTorrentProvider.getID().upper(),
|
||||||
curTorrentProvider.getID(), 0))
|
curTorrentProvider.getID(), 0))
|
||||||
|
|
||||||
if hasattr(curTorrentProvider, 'api_key'):
|
if hasattr(curTorrentProvider, 'api_key'):
|
||||||
curTorrentProvider.api_key = check_setting_str(CFG, curTorrentProvider.getID().upper(),
|
curTorrentProvider.api_key = check_setting_str(CFG, curTorrentProvider.getID().upper(),
|
||||||
curTorrentProvider.getID() + '_api_key', '')
|
curTorrentProvider.getID() + '_api_key', '')
|
||||||
|
|
||||||
if hasattr(curTorrentProvider, 'hash'):
|
if hasattr(curTorrentProvider, 'hash'):
|
||||||
curTorrentProvider.hash = check_setting_str(CFG, curTorrentProvider.getID().upper(),
|
curTorrentProvider.hash = check_setting_str(CFG, curTorrentProvider.getID().upper(),
|
||||||
curTorrentProvider.getID() + '_hash', '')
|
curTorrentProvider.getID() + '_hash', '')
|
||||||
|
|
||||||
if hasattr(curTorrentProvider, 'digest'):
|
if hasattr(curTorrentProvider, 'digest'):
|
||||||
curTorrentProvider.digest = check_setting_str(CFG, curTorrentProvider.getID().upper(),
|
curTorrentProvider.digest = check_setting_str(CFG, curTorrentProvider.getID().upper(),
|
||||||
curTorrentProvider.getID() + '_digest', '')
|
curTorrentProvider.getID() + '_digest', '')
|
||||||
|
|
||||||
if hasattr(curTorrentProvider, 'username'):
|
if hasattr(curTorrentProvider, 'username'):
|
||||||
curTorrentProvider.username = check_setting_str(CFG, curTorrentProvider.getID().upper(),
|
curTorrentProvider.username = check_setting_str(CFG, curTorrentProvider.getID().upper(),
|
||||||
curTorrentProvider.getID() + '_username', '')
|
curTorrentProvider.getID() + '_username', '')
|
||||||
|
|
||||||
if hasattr(curTorrentProvider, 'password'):
|
if hasattr(curTorrentProvider, 'password'):
|
||||||
curTorrentProvider.password = check_setting_str(CFG, curTorrentProvider.getID().upper(),
|
try:
|
||||||
curTorrentProvider.getID() + '_password', '') or \
|
curTorrentProvider.password = check_setting_str(CFG, curTorrentProvider.getID().upper(),
|
||||||
check_setting_str(CFG, curTorrentProvider.getID().upper(),
|
curTorrentProvider.getID() + '_password', '')
|
||||||
curTorrentProvider.getID() + '_passkey', '')
|
except:
|
||||||
|
curTorrentProvider.password = ''
|
||||||
|
|
||||||
if hasattr(curTorrentProvider, 'proxy'):
|
if hasattr(curTorrentProvider, 'proxy'):
|
||||||
curTorrentProvider.proxy.enabled = bool(check_setting_int(CFG, curTorrentProvider.getID().upper(),
|
curTorrentProvider.proxy.enabled = bool(check_setting_int(CFG, curTorrentProvider.getID().upper(),
|
||||||
curTorrentProvider.getID() + '_proxy', 0))
|
curTorrentProvider.getID() + '_proxy', 0))
|
||||||
if hasattr(curTorrentProvider.proxy, 'url'):
|
if hasattr(curTorrentProvider.proxy, 'url'):
|
||||||
curTorrentProvider.proxy.url = check_setting_str(CFG, curTorrentProvider.getID().upper(),
|
curTorrentProvider.proxy.url = check_setting_str(CFG, curTorrentProvider.getID().upper(),
|
||||||
curTorrentProvider.getID() + '_proxy_url', '')
|
curTorrentProvider.getID() + '_proxy_url', '')
|
||||||
|
|
||||||
if hasattr(curTorrentProvider, 'confirmed'):
|
if hasattr(curTorrentProvider, 'confirmed'):
|
||||||
curTorrentProvider.confirmed = bool(check_setting_int(CFG, curTorrentProvider.getID().upper(),
|
curTorrentProvider.confirmed = bool(check_setting_int(CFG, curTorrentProvider.getID().upper(),
|
||||||
curTorrentProvider.getID() + '_confirmed', 0)) or \
|
curTorrentProvider.getID() + '_confirmed', 0))
|
||||||
bool(check_setting_int(CFG, curTorrentProvider.getID().upper(),
|
|
||||||
curTorrentProvider.getID() + '_trusted', 0)) or \
|
|
||||||
bool(check_setting_int(CFG, curTorrentProvider.getID().upper(),
|
|
||||||
curTorrentProvider.getID() + '_verified', 0))
|
|
||||||
|
|
||||||
if hasattr(curTorrentProvider, 'options'):
|
if hasattr(curTorrentProvider, 'options'):
|
||||||
curTorrentProvider.options = check_setting_str(CFG, curTorrentProvider.getID().upper(),
|
curTorrentProvider.options = check_setting_str(CFG, curTorrentProvider.getID().upper(),
|
||||||
curTorrentProvider.getID() + '_options', '')
|
curTorrentProvider.getID() + '_options', '')
|
||||||
|
|
||||||
if hasattr(curTorrentProvider, 'ratio'):
|
if hasattr(curTorrentProvider, 'ratio'):
|
||||||
curTorrentProvider.ratio = float(check_setting_float(CFG, curTorrentProvider.getID().upper(),
|
curTorrentProvider.ratio = float(check_setting_float(CFG, curTorrentProvider.getID().upper(),
|
||||||
curTorrentProvider.getID() + '_ratio', 0))
|
curTorrentProvider.getID() + '_ratio', 0))
|
||||||
|
|
||||||
if hasattr(curTorrentProvider, 'freeleech'):
|
if hasattr(curTorrentProvider, 'freeleech'):
|
||||||
curTorrentProvider.freeleech = bool(check_setting_int(CFG, curTorrentProvider.getID().upper(),
|
curTorrentProvider.freeleech = bool(check_setting_int(CFG, curTorrentProvider.getID().upper(),
|
||||||
curTorrentProvider.getID() + '_freeleech', 0))
|
curTorrentProvider.getID() + '_freeleech', 0))
|
||||||
|
|
||||||
if hasattr(curTorrentProvider, 'search_mode'):
|
if hasattr(curTorrentProvider, 'search_mode'):
|
||||||
curTorrentProvider.search_mode = check_setting_str(CFG, curTorrentProvider.getID().upper(),
|
curTorrentProvider.search_mode = check_setting_str(CFG, curTorrentProvider.getID().upper(),
|
||||||
curTorrentProvider.getID() + '_search_mode', 'eponly')
|
curTorrentProvider.getID() + '_search_mode',
|
||||||
|
'eponly')
|
||||||
if hasattr(curTorrentProvider, 'search_fallback'):
|
if hasattr(curTorrentProvider, 'search_fallback'):
|
||||||
curTorrentProvider.search_fallback = bool(check_setting_int(CFG, curTorrentProvider.getID().upper(),
|
curTorrentProvider.search_fallback = bool(check_setting_int(CFG, curTorrentProvider.getID().upper(),
|
||||||
curTorrentProvider.getID() + '_search_mode', 0))
|
curTorrentProvider.getID() + '_search_mode',
|
||||||
|
0))
|
||||||
try:
|
try:
|
||||||
url = 'http://raw.github.com/echel0n/sickrage-init/master/settings.ini'
|
url = 'http://raw.github.com/echel0n/sickrage-init/master/settings.ini'
|
||||||
clear_cache = ElementTree.XML(helpers.getURL(url)).find('cache/clear').text
|
clear_cache = ElementTree.XML(helpers.getURL(url)).find('cache/clear').text
|
||||||
|
@ -1324,6 +1318,7 @@ def save_config():
|
||||||
new_config['General']['web_username'] = WEB_USERNAME
|
new_config['General']['web_username'] = WEB_USERNAME
|
||||||
new_config['General']['web_password'] = helpers.encrypt(WEB_PASSWORD, ENCRYPTION_VERSION)
|
new_config['General']['web_password'] = helpers.encrypt(WEB_PASSWORD, ENCRYPTION_VERSION)
|
||||||
new_config['General']['localhost_ip'] = LOCALHOST_IP
|
new_config['General']['localhost_ip'] = LOCALHOST_IP
|
||||||
|
new_config['General']['cpu_preset'] = CPU_PRESET
|
||||||
new_config['General']['anon_redirect'] = ANON_REDIRECT
|
new_config['General']['anon_redirect'] = ANON_REDIRECT
|
||||||
new_config['General']['use_api'] = int(USE_API)
|
new_config['General']['use_api'] = int(USE_API)
|
||||||
new_config['General']['api_key'] = API_KEY
|
new_config['General']['api_key'] = API_KEY
|
||||||
|
@ -1405,31 +1400,44 @@ def save_config():
|
||||||
new_config[curTorrentProvider.getID().upper()] = {}
|
new_config[curTorrentProvider.getID().upper()] = {}
|
||||||
new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID()] = int(curTorrentProvider.enabled)
|
new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID()] = int(curTorrentProvider.enabled)
|
||||||
if hasattr(curTorrentProvider, 'digest'):
|
if hasattr(curTorrentProvider, 'digest'):
|
||||||
new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID() + '_digest'] = curTorrentProvider.digest
|
new_config[curTorrentProvider.getID().upper()][
|
||||||
|
curTorrentProvider.getID() + '_digest'] = curTorrentProvider.digest
|
||||||
if hasattr(curTorrentProvider, 'hash'):
|
if hasattr(curTorrentProvider, 'hash'):
|
||||||
new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID() + '_hash'] = curTorrentProvider.hash
|
new_config[curTorrentProvider.getID().upper()][
|
||||||
|
curTorrentProvider.getID() + '_hash'] = curTorrentProvider.hash
|
||||||
if hasattr(curTorrentProvider, 'api_key'):
|
if hasattr(curTorrentProvider, 'api_key'):
|
||||||
new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID() + '_api_key'] = curTorrentProvider.api_key
|
new_config[curTorrentProvider.getID().upper()][
|
||||||
|
curTorrentProvider.getID() + '_api_key'] = curTorrentProvider.api_key
|
||||||
if hasattr(curTorrentProvider, 'username'):
|
if hasattr(curTorrentProvider, 'username'):
|
||||||
new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID() + '_username'] = curTorrentProvider.username
|
new_config[curTorrentProvider.getID().upper()][
|
||||||
|
curTorrentProvider.getID() + '_username'] = curTorrentProvider.username
|
||||||
if hasattr(curTorrentProvider, 'password'):
|
if hasattr(curTorrentProvider, 'password'):
|
||||||
new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID() + '_password'] = helpers.encrypt(curTorrentProvider.password, ENCRYPTION_VERSION)
|
new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID() + '_password'] = helpers.encrypt(
|
||||||
|
curTorrentProvider.password, ENCRYPTION_VERSION)
|
||||||
if hasattr(curTorrentProvider, 'confirmed'):
|
if hasattr(curTorrentProvider, 'confirmed'):
|
||||||
new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID() + '_confirmed'] = int(curTorrentProvider.confirmed)
|
new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID() + '_confirmed'] = int(
|
||||||
|
curTorrentProvider.confirmed)
|
||||||
if hasattr(curTorrentProvider, 'ratio'):
|
if hasattr(curTorrentProvider, 'ratio'):
|
||||||
new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID() + '_ratio'] = float(curTorrentProvider.ratio)
|
new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID() + '_ratio'] = float(
|
||||||
|
curTorrentProvider.ratio)
|
||||||
if hasattr(curTorrentProvider, 'options'):
|
if hasattr(curTorrentProvider, 'options'):
|
||||||
new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID() + '_options'] = curTorrentProvider.options
|
new_config[curTorrentProvider.getID().upper()][
|
||||||
|
curTorrentProvider.getID() + '_options'] = curTorrentProvider.options
|
||||||
if hasattr(curTorrentProvider, 'proxy'):
|
if hasattr(curTorrentProvider, 'proxy'):
|
||||||
new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID() + '_proxy'] = int(curTorrentProvider.proxy.enabled)
|
new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID() + '_proxy'] = int(
|
||||||
|
curTorrentProvider.proxy.enabled)
|
||||||
if hasattr(curTorrentProvider.proxy, 'url'):
|
if hasattr(curTorrentProvider.proxy, 'url'):
|
||||||
new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID() + '_proxy_url'] = curTorrentProvider.proxy.url
|
new_config[curTorrentProvider.getID().upper()][
|
||||||
|
curTorrentProvider.getID() + '_proxy_url'] = curTorrentProvider.proxy.url
|
||||||
if hasattr(curTorrentProvider, 'freeleech'):
|
if hasattr(curTorrentProvider, 'freeleech'):
|
||||||
new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID() + '_freeleech'] = int(curTorrentProvider.freeleech)
|
new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID() + '_freeleech'] = int(
|
||||||
|
curTorrentProvider.freeleech)
|
||||||
if hasattr(curTorrentProvider, 'search_mode'):
|
if hasattr(curTorrentProvider, 'search_mode'):
|
||||||
new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID() + '_search_mode'] = curTorrentProvider.search_mode
|
new_config[curTorrentProvider.getID().upper()][
|
||||||
|
curTorrentProvider.getID() + '_search_mode'] = curTorrentProvider.search_mode
|
||||||
if hasattr(curTorrentProvider, 'search_fallback'):
|
if hasattr(curTorrentProvider, 'search_fallback'):
|
||||||
new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID() + '_search_fallback'] = int(curTorrentProvider.search_fallback)
|
new_config[curTorrentProvider.getID().upper()][curTorrentProvider.getID() + '_search_fallback'] = int(
|
||||||
|
curTorrentProvider.search_fallback)
|
||||||
|
|
||||||
new_config['NZBs'] = {}
|
new_config['NZBs'] = {}
|
||||||
new_config['NZBs']['nzbs'] = int(NZBS)
|
new_config['NZBs']['nzbs'] = int(NZBS)
|
||||||
|
|
|
@ -37,6 +37,11 @@ mediaExtensions = ['avi', 'mkv', 'mpg', 'mpeg', 'wmv',
|
||||||
|
|
||||||
subtitleExtensions = ['srt', 'sub', 'ass', 'idx', 'ssa']
|
subtitleExtensions = ['srt', 'sub', 'ass', 'idx', 'ssa']
|
||||||
|
|
||||||
|
cpu_presets = {'HIGH': 0.01,
|
||||||
|
'NORMAL': 0.05,
|
||||||
|
'LOW': 0.1
|
||||||
|
}
|
||||||
|
|
||||||
### Other constants
|
### Other constants
|
||||||
MULTI_EP_RESULT = -1
|
MULTI_EP_RESULT = -1
|
||||||
SEASON_RESULT = -2
|
SEASON_RESULT = -2
|
||||||
|
|
|
@ -25,6 +25,7 @@ import time
|
||||||
import sickbeard
|
import sickbeard
|
||||||
|
|
||||||
from sickbeard import logger, helpers, scene_numbering
|
from sickbeard import logger, helpers, scene_numbering
|
||||||
|
from sickbeard.common import cpu_presets
|
||||||
from dateutil import parser
|
from dateutil import parser
|
||||||
|
|
||||||
nameparser_lock = threading.Lock()
|
nameparser_lock = threading.Lock()
|
||||||
|
@ -98,7 +99,7 @@ class NameParser(object):
|
||||||
|
|
||||||
for (cur_regex_name, cur_regex) in self.compiled_regexes:
|
for (cur_regex_name, cur_regex) in self.compiled_regexes:
|
||||||
|
|
||||||
time.sleep(0.05)
|
time.sleep(cpu_presets[sickbeard.CPU_PRESET])
|
||||||
|
|
||||||
match = cur_regex.match(name)
|
match = cur_regex.match(name)
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ from sickbeard import scene_exceptions
|
||||||
from sickbeard import logger
|
from sickbeard import logger
|
||||||
from sickbeard import tvcache
|
from sickbeard import tvcache
|
||||||
from sickbeard.helpers import sanitizeSceneName
|
from sickbeard.helpers import sanitizeSceneName
|
||||||
from sickbeard.common import Quality
|
from sickbeard.common import cpu_presets
|
||||||
from sickbeard.exceptions import ex, AuthException
|
from sickbeard.exceptions import ex, AuthException
|
||||||
|
|
||||||
from lib import jsonrpclib
|
from lib import jsonrpclib
|
||||||
|
@ -337,7 +337,7 @@ class BTNCache(tvcache.TVCache):
|
||||||
if ci is not None:
|
if ci is not None:
|
||||||
cl.append(ci)
|
cl.append(ci)
|
||||||
|
|
||||||
time.sleep(0.05)
|
time.sleep(cpu_presets[sickbeard.CPU_PRESET])
|
||||||
|
|
||||||
myDB = self._getDB()
|
myDB = self._getDB()
|
||||||
myDB.mass_action(cl)
|
myDB.mass_action(cl)
|
||||||
|
|
|
@ -31,7 +31,7 @@ import sickbeard
|
||||||
from lib import requests
|
from lib import requests
|
||||||
from lib.feedparser import feedparser
|
from lib.feedparser import feedparser
|
||||||
from sickbeard import helpers, classes, logger, db
|
from sickbeard import helpers, classes, logger, db
|
||||||
from sickbeard.common import MULTI_EP_RESULT, SEASON_RESULT #, SEED_POLICY_TIME, SEED_POLICY_RATIO
|
from sickbeard.common import MULTI_EP_RESULT, SEASON_RESULT, cpu_presets
|
||||||
from sickbeard import tvcache
|
from sickbeard import tvcache
|
||||||
from sickbeard import encodingKludge as ek
|
from sickbeard import encodingKludge as ek
|
||||||
from sickbeard.exceptions import ex
|
from sickbeard.exceptions import ex
|
||||||
|
@ -278,7 +278,7 @@ class GenericProvider:
|
||||||
for ep_obj in searchItems:
|
for ep_obj in searchItems:
|
||||||
for item in searchItems[ep_obj]:
|
for item in searchItems[ep_obj]:
|
||||||
|
|
||||||
time.sleep(0.05)
|
time.sleep(cpu_presets[sickbeard.CPU_PRESET])
|
||||||
|
|
||||||
(title, url) = self._get_title_and_url(item)
|
(title, url) = self._get_title_and_url(item)
|
||||||
|
|
||||||
|
|
|
@ -22,9 +22,8 @@ import sickbeard
|
||||||
from sickbeard import classes
|
from sickbeard import classes
|
||||||
from sickbeard import logger, tvcache, exceptions
|
from sickbeard import logger, tvcache, exceptions
|
||||||
from sickbeard import helpers
|
from sickbeard import helpers
|
||||||
from sickbeard.common import Quality
|
from sickbeard.common import cpu_presets
|
||||||
from sickbeard.exceptions import ex, AuthException
|
from sickbeard.exceptions import ex, AuthException
|
||||||
from sickbeard.name_parser.parser import NameParser, InvalidNameException
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import json
|
import json
|
||||||
|
@ -226,7 +225,7 @@ class HDBitsCache(tvcache.TVCache):
|
||||||
if ci is not None:
|
if ci is not None:
|
||||||
ql.append(ci)
|
ql.append(ci)
|
||||||
|
|
||||||
time.sleep(0.05)
|
time.sleep(cpu_presets[sickbeard.CPU_PRESET])
|
||||||
|
|
||||||
myDB = self._getDB()
|
myDB = self._getDB()
|
||||||
myDB.mass_action(ql)
|
myDB.mass_action(ql)
|
||||||
|
|
|
@ -24,7 +24,7 @@ import datetime
|
||||||
import urlparse
|
import urlparse
|
||||||
import sickbeard
|
import sickbeard
|
||||||
import generic
|
import generic
|
||||||
from sickbeard.common import Quality
|
from sickbeard.common import Quality, cpu_presets
|
||||||
from sickbeard import logger
|
from sickbeard import logger
|
||||||
from sickbeard import tvcache
|
from sickbeard import tvcache
|
||||||
from sickbeard import db
|
from sickbeard import db
|
||||||
|
@ -361,7 +361,7 @@ class HDTorrentsCache(tvcache.TVCache):
|
||||||
if ci is not None:
|
if ci is not None:
|
||||||
cl.append(ci)
|
cl.append(ci)
|
||||||
|
|
||||||
time.sleep(0.05)
|
time.sleep(cpu_presets[sickbeard.CPU_PRESET])
|
||||||
|
|
||||||
myDB = self._getDB()
|
myDB = self._getDB()
|
||||||
myDB.mass_action(cl)
|
myDB.mass_action(cl)
|
||||||
|
|
|
@ -23,7 +23,7 @@ import datetime
|
||||||
import urlparse
|
import urlparse
|
||||||
import sickbeard
|
import sickbeard
|
||||||
import generic
|
import generic
|
||||||
from sickbeard.common import Quality
|
from sickbeard.common import Quality, cpu_presets
|
||||||
from sickbeard import logger
|
from sickbeard import logger
|
||||||
from sickbeard import tvcache
|
from sickbeard import tvcache
|
||||||
from sickbeard import db
|
from sickbeard import db
|
||||||
|
@ -306,7 +306,7 @@ class IPTorrentsCache(tvcache.TVCache):
|
||||||
if ci is not None:
|
if ci is not None:
|
||||||
cl.append(ci)
|
cl.append(ci)
|
||||||
|
|
||||||
time.sleep(0.05)
|
time.sleep(cpu_presets[sickbeard.CPU_PRESET])
|
||||||
|
|
||||||
myDB = self._getDB()
|
myDB = self._getDB()
|
||||||
myDB.mass_action(cl)
|
myDB.mass_action(cl)
|
||||||
|
|
|
@ -30,7 +30,7 @@ import urlparse
|
||||||
|
|
||||||
import sickbeard
|
import sickbeard
|
||||||
import generic
|
import generic
|
||||||
from sickbeard.common import Quality, Overview
|
from sickbeard.common import Quality, cpu_presets
|
||||||
from sickbeard.name_parser.parser import NameParser, InvalidNameException
|
from sickbeard.name_parser.parser import NameParser, InvalidNameException
|
||||||
from sickbeard import logger
|
from sickbeard import logger
|
||||||
from sickbeard import tvcache
|
from sickbeard import tvcache
|
||||||
|
@ -436,7 +436,7 @@ class KATCache(tvcache.TVCache):
|
||||||
if ci is not None:
|
if ci is not None:
|
||||||
cl.append(ci)
|
cl.append(ci)
|
||||||
|
|
||||||
time.sleep(0.05)
|
time.sleep(cpu_presets[sickbeard.CPU_PRESET])
|
||||||
|
|
||||||
myDB = self._getDB()
|
myDB = self._getDB()
|
||||||
myDB.mass_action(cl)
|
myDB.mass_action(cl)
|
||||||
|
|
|
@ -33,7 +33,7 @@ from sickbeard import classes
|
||||||
from sickbeard import helpers
|
from sickbeard import helpers
|
||||||
from sickbeard import scene_exceptions
|
from sickbeard import scene_exceptions
|
||||||
from sickbeard import encodingKludge as ek
|
from sickbeard import encodingKludge as ek
|
||||||
|
from sickbeard.common import cpu_presets
|
||||||
from sickbeard import logger
|
from sickbeard import logger
|
||||||
from sickbeard import tvcache
|
from sickbeard import tvcache
|
||||||
from sickbeard.exceptions import ex, AuthException
|
from sickbeard.exceptions import ex, AuthException
|
||||||
|
@ -297,7 +297,7 @@ class NewznabCache(tvcache.TVCache):
|
||||||
if ci is not None:
|
if ci is not None:
|
||||||
ql.append(ci)
|
ql.append(ci)
|
||||||
|
|
||||||
time.sleep(0.05)
|
time.sleep(cpu_presets[sickbeard.CPU_PRESET])
|
||||||
|
|
||||||
myDB = self._getDB()
|
myDB = self._getDB()
|
||||||
myDB.mass_action(ql)
|
myDB.mass_action(ql)
|
||||||
|
|
|
@ -25,7 +25,7 @@ import datetime
|
||||||
import urlparse
|
import urlparse
|
||||||
import sickbeard
|
import sickbeard
|
||||||
import generic
|
import generic
|
||||||
from sickbeard.common import Quality
|
from sickbeard.common import Quality, cpu_presets
|
||||||
from sickbeard import logger
|
from sickbeard import logger
|
||||||
from sickbeard import tvcache
|
from sickbeard import tvcache
|
||||||
from sickbeard import db
|
from sickbeard import db
|
||||||
|
@ -355,7 +355,7 @@ class NextGenCache(tvcache.TVCache):
|
||||||
if ci is not None:
|
if ci is not None:
|
||||||
cl.append(ci)
|
cl.append(ci)
|
||||||
|
|
||||||
time.sleep(0.05)
|
time.sleep(cpu_presets[sickbeard.CPU_PRESET])
|
||||||
|
|
||||||
myDB = self._getDB()
|
myDB = self._getDB()
|
||||||
myDB.mass_action(cl)
|
myDB.mass_action(cl)
|
||||||
|
|
|
@ -29,7 +29,7 @@ import datetime
|
||||||
import sickbeard
|
import sickbeard
|
||||||
import generic
|
import generic
|
||||||
|
|
||||||
from sickbeard.common import Quality, Overview
|
from sickbeard.common import Quality, cpu_presets
|
||||||
from sickbeard.name_parser.parser import NameParser, InvalidNameException
|
from sickbeard.name_parser.parser import NameParser, InvalidNameException
|
||||||
from sickbeard import logger
|
from sickbeard import logger
|
||||||
from sickbeard import tvcache
|
from sickbeard import tvcache
|
||||||
|
@ -328,7 +328,7 @@ class PublicHDCache(tvcache.TVCache):
|
||||||
if ci is not None:
|
if ci is not None:
|
||||||
ql.append(ci)
|
ql.append(ci)
|
||||||
|
|
||||||
time.sleep(0.05)
|
time.sleep(cpu_presets[sickbeard.CPU_PRESET])
|
||||||
|
|
||||||
myDB = self._getDB()
|
myDB = self._getDB()
|
||||||
myDB.mass_action(ql)
|
myDB.mass_action(ql)
|
||||||
|
|
|
@ -24,7 +24,7 @@ import datetime
|
||||||
import urlparse
|
import urlparse
|
||||||
import sickbeard
|
import sickbeard
|
||||||
import generic
|
import generic
|
||||||
from sickbeard.common import Quality
|
from sickbeard.common import Quality, cpu_presets
|
||||||
from sickbeard import logger
|
from sickbeard import logger
|
||||||
from sickbeard import tvcache
|
from sickbeard import tvcache
|
||||||
from sickbeard import db
|
from sickbeard import db
|
||||||
|
@ -348,7 +348,7 @@ class SCCCache(tvcache.TVCache):
|
||||||
if ci is not None:
|
if ci is not None:
|
||||||
cl.append(ci)
|
cl.append(ci)
|
||||||
|
|
||||||
time.sleep(0.05)
|
time.sleep(cpu_presets[sickbeard.CPU_PRESET])
|
||||||
|
|
||||||
myDB = self._getDB()
|
myDB = self._getDB()
|
||||||
myDB.mass_action(cl)
|
myDB.mass_action(cl)
|
||||||
|
|
|
@ -23,7 +23,7 @@ import time
|
||||||
import sickbeard
|
import sickbeard
|
||||||
import generic
|
import generic
|
||||||
|
|
||||||
from sickbeard.common import Quality
|
from sickbeard.common import Quality, cpu_presets
|
||||||
from sickbeard import logger
|
from sickbeard import logger
|
||||||
from sickbeard import tvcache
|
from sickbeard import tvcache
|
||||||
from sickbeard import db
|
from sickbeard import db
|
||||||
|
@ -284,7 +284,7 @@ class SpeedCDCache(tvcache.TVCache):
|
||||||
if ci is not None:
|
if ci is not None:
|
||||||
ql.append(ci)
|
ql.append(ci)
|
||||||
|
|
||||||
time.sleep(0.05)
|
time.sleep(cpu_presets[sickbeard.CPU_PRESET])
|
||||||
|
|
||||||
myDB = self._getDB()
|
myDB = self._getDB()
|
||||||
myDB.mass_action(ql)
|
myDB.mass_action(ql)
|
||||||
|
|
|
@ -27,7 +27,7 @@ import datetime
|
||||||
|
|
||||||
import sickbeard
|
import sickbeard
|
||||||
import generic
|
import generic
|
||||||
from sickbeard.common import Quality
|
from sickbeard.common import Quality, cpu_presets
|
||||||
from sickbeard.name_parser.parser import NameParser, InvalidNameException
|
from sickbeard.name_parser.parser import NameParser, InvalidNameException
|
||||||
from sickbeard import db
|
from sickbeard import db
|
||||||
from sickbeard import classes
|
from sickbeard import classes
|
||||||
|
@ -417,7 +417,7 @@ class ThePirateBayCache(tvcache.TVCache):
|
||||||
if ci is not None:
|
if ci is not None:
|
||||||
cl.append(ci)
|
cl.append(ci)
|
||||||
|
|
||||||
time.sleep(0.05)
|
time.sleep(cpu_presets[sickbeard.CPU_PRESET])
|
||||||
|
|
||||||
myDB = self._getDB()
|
myDB = self._getDB()
|
||||||
myDB.mass_action(cl)
|
myDB.mass_action(cl)
|
||||||
|
|
|
@ -23,7 +23,7 @@ import datetime
|
||||||
import urlparse
|
import urlparse
|
||||||
import sickbeard
|
import sickbeard
|
||||||
import generic
|
import generic
|
||||||
from sickbeard.common import Quality
|
from sickbeard.common import Quality, cpu_presets
|
||||||
from sickbeard import logger
|
from sickbeard import logger
|
||||||
from sickbeard import tvcache
|
from sickbeard import tvcache
|
||||||
from sickbeard import db
|
from sickbeard import db
|
||||||
|
@ -309,7 +309,7 @@ class TorrentDayCache(tvcache.TVCache):
|
||||||
if ci is not None:
|
if ci is not None:
|
||||||
cl.append(ci)
|
cl.append(ci)
|
||||||
|
|
||||||
time.sleep(0.05)
|
time.sleep(cpu_presets[sickbeard.CPU_PRESET])
|
||||||
|
|
||||||
myDB = self._getDB()
|
myDB = self._getDB()
|
||||||
myDB.mass_action(cl)
|
myDB.mass_action(cl)
|
||||||
|
|
|
@ -23,7 +23,7 @@ import urlparse
|
||||||
import time
|
import time
|
||||||
import sickbeard
|
import sickbeard
|
||||||
import generic
|
import generic
|
||||||
from sickbeard.common import Quality
|
from sickbeard.common import Quality, cpu_presets
|
||||||
from sickbeard import logger
|
from sickbeard import logger
|
||||||
from sickbeard import tvcache
|
from sickbeard import tvcache
|
||||||
from sickbeard import db
|
from sickbeard import db
|
||||||
|
@ -307,7 +307,7 @@ class TorrentLeechCache(tvcache.TVCache):
|
||||||
if ci is not None:
|
if ci is not None:
|
||||||
cl.append(ci)
|
cl.append(ci)
|
||||||
|
|
||||||
time.sleep(0.05)
|
time.sleep(cpu_presets[sickbeard.CPU_PRESET])
|
||||||
|
|
||||||
myDB = self._getDB()
|
myDB = self._getDB()
|
||||||
myDB.mass_action(cl)
|
myDB.mass_action(cl)
|
||||||
|
|
|
@ -410,7 +410,7 @@ class QueueItemRefresh(ShowQueueItem):
|
||||||
|
|
||||||
self.show.refreshDir()
|
self.show.refreshDir()
|
||||||
self.show.writeMetadata()
|
self.show.writeMetadata()
|
||||||
self.show.updateMetadata()
|
#self.show.updateMetadata()
|
||||||
self.show.populateCache()
|
self.show.populateCache()
|
||||||
|
|
||||||
self.inProgress = False
|
self.inProgress = False
|
||||||
|
|
|
@ -34,7 +34,7 @@ from lib.feedcache import cache
|
||||||
|
|
||||||
from sickbeard import db
|
from sickbeard import db
|
||||||
from sickbeard import logger
|
from sickbeard import logger
|
||||||
from sickbeard.common import Quality
|
from sickbeard.common import Quality, cpu_presets
|
||||||
|
|
||||||
from sickbeard import helpers, show_name_helpers
|
from sickbeard import helpers, show_name_helpers
|
||||||
from sickbeard.exceptions import MultipleShowObjectsException
|
from sickbeard.exceptions import MultipleShowObjectsException
|
||||||
|
@ -124,7 +124,7 @@ class TVCache():
|
||||||
if ci is not None:
|
if ci is not None:
|
||||||
cl.append(ci)
|
cl.append(ci)
|
||||||
|
|
||||||
time.sleep(0.05)
|
time.sleep(cpu_presets[sickbeard.CPU_PRESET])
|
||||||
|
|
||||||
myDB = self._getDB()
|
myDB = self._getDB()
|
||||||
myDB.mass_action(cl)
|
myDB.mass_action(cl)
|
||||||
|
@ -375,7 +375,7 @@ class TVCache():
|
||||||
# for each cache entry
|
# for each cache entry
|
||||||
for curResult in sqlResults:
|
for curResult in sqlResults:
|
||||||
|
|
||||||
time.sleep(0.05)
|
time.sleep(cpu_presets[sickbeard.CPU_PRESET])
|
||||||
|
|
||||||
# skip non-tv crap (but allow them for Newzbin cause we assume it's filtered well)
|
# skip non-tv crap (but allow them for Newzbin cause we assume it's filtered well)
|
||||||
if self.providerID != 'newzbin' and not show_name_helpers.filterBadReleases(curResult["name"]):
|
if self.providerID != 'newzbin' and not show_name_helpers.filterBadReleases(curResult["name"]):
|
||||||
|
|
|
@ -1011,7 +1011,7 @@ class ConfigGeneral:
|
||||||
web_password=None, version_notify=None, enable_https=None, https_cert=None, https_key=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, proxy_setting=None,
|
handle_reverse_proxy=None, sort_article=None, auto_update=None, proxy_setting=None,
|
||||||
anon_redirect=None, git_path=None, calendar_unprotected=None, date_preset=None, time_preset=None,
|
anon_redirect=None, git_path=None, calendar_unprotected=None, date_preset=None, time_preset=None,
|
||||||
indexer_default=None, timezone_display=None):
|
indexer_default=None, timezone_display=None, cpu_preset=None):
|
||||||
|
|
||||||
results = []
|
results = []
|
||||||
|
|
||||||
|
@ -1025,6 +1025,7 @@ class ConfigGeneral:
|
||||||
config.change_UPDATE_FREQUENCY(update_frequency)
|
config.change_UPDATE_FREQUENCY(update_frequency)
|
||||||
sickbeard.LAUNCH_BROWSER = config.checkbox_to_value(launch_browser)
|
sickbeard.LAUNCH_BROWSER = config.checkbox_to_value(launch_browser)
|
||||||
sickbeard.SORT_ARTICLE = config.checkbox_to_value(sort_article)
|
sickbeard.SORT_ARTICLE = config.checkbox_to_value(sort_article)
|
||||||
|
sickbeard.CPU_PRESET = cpu_preset
|
||||||
sickbeard.ANON_REDIRECT = anon_redirect
|
sickbeard.ANON_REDIRECT = anon_redirect
|
||||||
sickbeard.PROXY_SETTING = proxy_setting
|
sickbeard.PROXY_SETTING = proxy_setting
|
||||||
sickbeard.GIT_PATH = git_path
|
sickbeard.GIT_PATH = git_path
|
||||||
|
@ -1116,7 +1117,7 @@ class ConfigSearch:
|
||||||
|
|
||||||
sickbeard.NZB_METHOD = nzb_method
|
sickbeard.NZB_METHOD = nzb_method
|
||||||
sickbeard.TORRENT_METHOD = torrent_method
|
sickbeard.TORRENT_METHOD = torrent_method
|
||||||
sickbeard.USENET_RETENTION = sickbeard.USENET_RETENTION = config.to_int(usenet_retention, default=500)
|
sickbeard.USENET_RETENTION = config.to_int(usenet_retention, default=500)
|
||||||
|
|
||||||
sickbeard.IGNORE_WORDS = ignore_words if ignore_words else ""
|
sickbeard.IGNORE_WORDS = ignore_words if ignore_words else ""
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue