mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-12 11:02:21 -05:00
Backlog frequency determined by algo that takes into account daily search frequency to prevent overlap of searches, automatically calculates allowed minimum value that is user-settable
This commit is contained in:
parent
417047f590
commit
e78392f04a
@ -84,6 +84,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<label class="nocheck clearfix">
|
<label class="nocheck clearfix">
|
||||||
<span class="component-title"> </span>
|
<span class="component-title"> </span>
|
||||||
|
<span class="component-desc">Allowed minimum value: $sickbeard.MIN_BACKLOG_FREQUENCY</span>
|
||||||
<span class="component-desc">Time in minutes between searches (eg. 60)</span>
|
<span class="component-desc">Time in minutes between searches (eg. 60)</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
@ -192,19 +192,20 @@ ALLOW_HIGH_PRIORITY = False
|
|||||||
AUTOPOSTPROCESSER_FREQUENCY = None
|
AUTOPOSTPROCESSER_FREQUENCY = None
|
||||||
DAILYSEARCH_FREQUENCY = None
|
DAILYSEARCH_FREQUENCY = None
|
||||||
UPDATE_FREQUENCY = None
|
UPDATE_FREQUENCY = None
|
||||||
BACKLOG_FREQUENCY = None
|
|
||||||
DAILYSEARCH_STARTUP = False
|
DAILYSEARCH_STARTUP = False
|
||||||
|
BACKLOG_FREQUENCY = None
|
||||||
BACKLOG_STARTUP = False
|
BACKLOG_STARTUP = False
|
||||||
|
|
||||||
MIN_AUTOPOSTPROCESSER_FREQUENCY = 1
|
|
||||||
MIN_BACKLOG_FREQUENCY = 1440
|
|
||||||
MIN_DAILYSEARCH_FREQUENCY = 10
|
|
||||||
MIN_UPDATE_FREQUENCY = 1
|
|
||||||
DEFAULT_AUTOPOSTPROCESSER_FREQUENCY = 10
|
DEFAULT_AUTOPOSTPROCESSER_FREQUENCY = 10
|
||||||
DEFAULT_BACKLOG_FREQUENCY = 10080
|
DEFAULT_DAILYSEARCH_FREQUENCY = 40
|
||||||
DEFAULT_DAILYSEARCH_FREQUENCY = 60
|
DEFAULT_BACKLOG_FREQUENCY = 21
|
||||||
DEFAULT_UPDATE_FREQUENCY = 1
|
DEFAULT_UPDATE_FREQUENCY = 1
|
||||||
|
|
||||||
|
MIN_AUTOPOSTPROCESSER_FREQUENCY = 1
|
||||||
|
MIN_DAILYSEARCH_FREQUENCY = 10
|
||||||
|
MIN_BACKLOG_FREQUENCY = 10
|
||||||
|
MIN_UPDATE_FREQUENCY = 1
|
||||||
|
|
||||||
BACKLOG_DAYS = 7
|
BACKLOG_DAYS = 7
|
||||||
|
|
||||||
ADD_SHOWS_WO_DIR = False
|
ADD_SHOWS_WO_DIR = False
|
||||||
@ -446,6 +447,9 @@ TRAKT_API_KEY = 'abd806c54516240c76e4ebc9c5ccf394'
|
|||||||
|
|
||||||
__INITIALIZED__ = False
|
__INITIALIZED__ = False
|
||||||
|
|
||||||
|
def get_backlog_cycle_time():
|
||||||
|
cycletime = DAILYSEARCH_FREQUENCY * 2 + 7
|
||||||
|
return max([cycletime, 720])
|
||||||
|
|
||||||
def initialize(consoleLogging=True):
|
def initialize(consoleLogging=True):
|
||||||
with INIT_LOCK:
|
with INIT_LOCK:
|
||||||
@ -663,6 +667,7 @@ def initialize(consoleLogging=True):
|
|||||||
if DAILYSEARCH_FREQUENCY < MIN_DAILYSEARCH_FREQUENCY:
|
if DAILYSEARCH_FREQUENCY < MIN_DAILYSEARCH_FREQUENCY:
|
||||||
DAILYSEARCH_FREQUENCY = MIN_DAILYSEARCH_FREQUENCY
|
DAILYSEARCH_FREQUENCY = MIN_DAILYSEARCH_FREQUENCY
|
||||||
|
|
||||||
|
MIN_BACKLOG_FREQUENCY = get_backlog_cycle_time()
|
||||||
BACKLOG_FREQUENCY = check_setting_int(CFG, 'General', 'backlog_frequency', DEFAULT_BACKLOG_FREQUENCY)
|
BACKLOG_FREQUENCY = check_setting_int(CFG, 'General', 'backlog_frequency', DEFAULT_BACKLOG_FREQUENCY)
|
||||||
if BACKLOG_FREQUENCY < MIN_BACKLOG_FREQUENCY:
|
if BACKLOG_FREQUENCY < MIN_BACKLOG_FREQUENCY:
|
||||||
BACKLOG_FREQUENCY = MIN_BACKLOG_FREQUENCY
|
BACKLOG_FREQUENCY = MIN_BACKLOG_FREQUENCY
|
||||||
|
@ -1616,7 +1616,7 @@ class ConfigSearch(MainHandler):
|
|||||||
|
|
||||||
def saveSearch(self, use_nzbs=None, use_torrents=None, nzb_dir=None, sab_username=None, sab_password=None,
|
def saveSearch(self, use_nzbs=None, use_torrents=None, nzb_dir=None, sab_username=None, sab_password=None,
|
||||||
sab_apikey=None, sab_category=None, sab_host=None, nzbget_username=None, nzbget_password=None,
|
sab_apikey=None, sab_category=None, sab_host=None, nzbget_username=None, nzbget_password=None,
|
||||||
nzbget_category=None, nzbget_priority=100, nzbget_host=None, nzbget_use_https=None,
|
nzbget_category=None, nzbget_priority=None, nzbget_host=None, nzbget_use_https=None,
|
||||||
backlog_days=None, backlog_frequency=None, dailysearch_frequency=None,
|
backlog_days=None, backlog_frequency=None, dailysearch_frequency=None,
|
||||||
nzb_method=None, torrent_method=None, usenet_retention=None,
|
nzb_method=None, torrent_method=None, usenet_retention=None,
|
||||||
download_propers=None, check_propers_interval=None, allow_high_priority=None,
|
download_propers=None, check_propers_interval=None, allow_high_priority=None,
|
||||||
@ -1666,7 +1666,7 @@ class ConfigSearch(MainHandler):
|
|||||||
sickbeard.NZBGET_CATEGORY = nzbget_category
|
sickbeard.NZBGET_CATEGORY = nzbget_category
|
||||||
sickbeard.NZBGET_HOST = config.clean_host(nzbget_host)
|
sickbeard.NZBGET_HOST = config.clean_host(nzbget_host)
|
||||||
sickbeard.NZBGET_USE_HTTPS = config.checkbox_to_value(nzbget_use_https)
|
sickbeard.NZBGET_USE_HTTPS = config.checkbox_to_value(nzbget_use_https)
|
||||||
sickbeard.NZBGET_PRIORITY = int(nzbget_priority)
|
sickbeard.NZBGET_PRIORITY = config.to_int(nzbget_priority, default=100)
|
||||||
|
|
||||||
sickbeard.TORRENT_USERNAME = torrent_username
|
sickbeard.TORRENT_USERNAME = torrent_username
|
||||||
sickbeard.TORRENT_PASSWORD = torrent_password
|
sickbeard.TORRENT_PASSWORD = torrent_password
|
||||||
|
Loading…
Reference in New Issue
Block a user