mirror of
https://github.com/SickGear/SickGear.git
synced 2025-03-15 09:07:43 +00:00
Add search setting "Disable auto full backlog".
This commit is contained in:
parent
f4b0dda6c0
commit
3ca199157a
5 changed files with 37 additions and 9 deletions
|
@ -187,6 +187,7 @@
|
||||||
* Add Plex notifications secure connect where available (PMS 1.1.4.2757 and newer with username and password)
|
* Add Plex notifications secure connect where available (PMS 1.1.4.2757 and newer with username and password)
|
||||||
* Add if all torrent caches fail, save magnets from RARBG and TPB as files for clients (or plugins) that now support it
|
* Add if all torrent caches fail, save magnets from RARBG and TPB as files for clients (or plugins) that now support it
|
||||||
* Add advice to logs if all caches fail to switch to direct client connect instead of the basic blackhole method
|
* Add advice to logs if all caches fail to switch to direct client connect instead of the basic blackhole method
|
||||||
|
* Add search setting "Disable auto full backlog"
|
||||||
|
|
||||||
[develop changelog]
|
[develop changelog]
|
||||||
* Change send nzb data to NZBGet for Anizb instead of url
|
* Change send nzb data to NZBGet for Anizb instead of url
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
<span class="component-title">Download propers</span>
|
<span class="component-title">Download propers</span>
|
||||||
<span class="component-desc">
|
<span class="component-desc">
|
||||||
<input type="checkbox" name="download_propers" id="download_propers" class="enabler"<%= html_checked if sickbeard.DOWNLOAD_PROPERS == True else '' %>>
|
<input type="checkbox" name="download_propers" id="download_propers" class="enabler"<%= html_checked if sickbeard.DOWNLOAD_PROPERS == True else '' %>>
|
||||||
<p>replace original download with "Proper" or "Repack" if nuked</p>
|
<p>replace original download with 'Proper' or 'Repack' if nuked</p>
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
@ -93,6 +93,24 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field-pair">
|
<div class="field-pair">
|
||||||
|
<label for="backlog_nofull">
|
||||||
|
<span class="component-title">Disable auto full backlog</span>
|
||||||
|
<span class="component-desc">
|
||||||
|
<input type="checkbox" name="backlog_nofull" id="backlog_nofull" class="enabler viewIf"<%= html_checked if sickbeard.BACKLOG_NOFULL == True else '' %>>
|
||||||
|
<p>backlog search manually by setting episodes 'Wanted' or via 'Backlog overview'</p>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="field-pair" id="content_backlog_nofull">
|
||||||
|
<label>
|
||||||
|
<span class="component-title">Backlog search spread</span>
|
||||||
|
<span class="component-desc">
|
||||||
|
<p> ^ auto full backlog disabled</p>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="field-pair hide_if_backlog_nofull">
|
||||||
<label>
|
<label>
|
||||||
<span class="component-title">Backlog search spread</span>
|
<span class="component-title">Backlog search spread</span>
|
||||||
<span class="component-desc">
|
<span class="component-desc">
|
||||||
|
@ -116,7 +134,7 @@
|
||||||
<label>
|
<label>
|
||||||
<span class="component-title">Ignore result with any word</span>
|
<span class="component-title">Ignore result with any word</span>
|
||||||
<span class="component-desc">
|
<span class="component-desc">
|
||||||
<input type="text" name="ignore_words" value="$sickbeard.IGNORE_WORDS" class="form-control input-sm input350"><p>(opt: start "regex:")</p>
|
<input type="text" name="ignore_words" value="$sickbeard.IGNORE_WORDS" class="form-control input-sm input350"><p>(opt: start 'regex:')</p>
|
||||||
<p class="clear-left note">ignore search result <em class="grey-text">if its title contains any</em> of these comma seperated words</p>
|
<p class="clear-left note">ignore search result <em class="grey-text">if its title contains any</em> of these comma seperated words</p>
|
||||||
</span>
|
</span>
|
||||||
<span class="component-title">Shows with custom ignores</span>
|
<span class="component-title">Shows with custom ignores</span>
|
||||||
|
@ -138,7 +156,7 @@
|
||||||
<label>
|
<label>
|
||||||
<span class="component-title">Require all these words</span>
|
<span class="component-title">Require all these words</span>
|
||||||
<span class="component-desc">
|
<span class="component-desc">
|
||||||
<input type="text" name="require_words" value="$sickbeard.REQUIRE_WORDS" class="form-control input-sm input350"><p>(opt: start "regex:")</p>
|
<input type="text" name="require_words" value="$sickbeard.REQUIRE_WORDS" class="form-control input-sm input350"><p>(opt: start 'regex:')</p>
|
||||||
<p class="clear-left note">ignore search result <em class="grey-text">unless its title contains all</em> of these comma seperated words</p>
|
<p class="clear-left note">ignore search result <em class="grey-text">unless its title contains all</em> of these comma seperated words</p>
|
||||||
</span>
|
</span>
|
||||||
<span class="component-title">Shows with custom requires</span>
|
<span class="component-title">Shows with custom requires</span>
|
||||||
|
|
|
@ -210,6 +210,7 @@ UPDATE_FREQUENCY = None
|
||||||
RECENTSEARCH_STARTUP = False
|
RECENTSEARCH_STARTUP = False
|
||||||
BACKLOG_FREQUENCY = None
|
BACKLOG_FREQUENCY = None
|
||||||
BACKLOG_STARTUP = False
|
BACKLOG_STARTUP = False
|
||||||
|
BACKLOG_NOFULL = False
|
||||||
|
|
||||||
DEFAULT_AUTOPOSTPROCESSER_FREQUENCY = 10
|
DEFAULT_AUTOPOSTPROCESSER_FREQUENCY = 10
|
||||||
DEFAULT_RECENTSEARCH_FREQUENCY = 40
|
DEFAULT_RECENTSEARCH_FREQUENCY = 40
|
||||||
|
@ -514,7 +515,7 @@ def initialize(consoleLogging=True):
|
||||||
USE_PLEX, PLEX_NOTIFY_ONSNATCH, PLEX_NOTIFY_ONDOWNLOAD, PLEX_NOTIFY_ONSUBTITLEDOWNLOAD, \
|
USE_PLEX, PLEX_NOTIFY_ONSNATCH, PLEX_NOTIFY_ONDOWNLOAD, PLEX_NOTIFY_ONSUBTITLEDOWNLOAD, \
|
||||||
PLEX_UPDATE_LIBRARY, PLEX_SERVER_HOST, PLEX_HOST, PLEX_USERNAME, PLEX_PASSWORD, \
|
PLEX_UPDATE_LIBRARY, PLEX_SERVER_HOST, PLEX_HOST, PLEX_USERNAME, PLEX_PASSWORD, \
|
||||||
USE_TRAKT, TRAKT_CONNECTED_ACCOUNT, TRAKT_ACCOUNTS, TRAKT_MRU, TRAKT_VERIFY, TRAKT_REMOVE_WATCHLIST, TRAKT_TIMEOUT, TRAKT_USE_WATCHLIST, TRAKT_METHOD_ADD, TRAKT_START_PAUSED, traktCheckerScheduler, TRAKT_SYNC, TRAKT_DEFAULT_INDEXER, TRAKT_REMOVE_SERIESLIST, TRAKT_UPDATE_COLLECTION, \
|
USE_TRAKT, TRAKT_CONNECTED_ACCOUNT, TRAKT_ACCOUNTS, TRAKT_MRU, TRAKT_VERIFY, TRAKT_REMOVE_WATCHLIST, TRAKT_TIMEOUT, TRAKT_USE_WATCHLIST, TRAKT_METHOD_ADD, TRAKT_START_PAUSED, traktCheckerScheduler, TRAKT_SYNC, TRAKT_DEFAULT_INDEXER, TRAKT_REMOVE_SERIESLIST, TRAKT_UPDATE_COLLECTION, \
|
||||||
BACKLOG_FREQUENCY, DEFAULT_BACKLOG_FREQUENCY, MIN_BACKLOG_FREQUENCY, MAX_BACKLOG_FREQUENCY, BACKLOG_STARTUP, SKIP_REMOVED_FILES, \
|
BACKLOG_FREQUENCY, DEFAULT_BACKLOG_FREQUENCY, MIN_BACKLOG_FREQUENCY, MAX_BACKLOG_FREQUENCY, BACKLOG_STARTUP, BACKLOG_NOFULL, SKIP_REMOVED_FILES, \
|
||||||
showUpdateScheduler, __INITIALIZED__, LAUNCH_BROWSER, TRASH_REMOVE_SHOW, TRASH_ROTATE_LOGS, HOME_SEARCH_FOCUS, SORT_ARTICLE, showList, loadingShowList, UPDATE_SHOWS_ON_START, SHOW_UPDATE_HOUR, \
|
showUpdateScheduler, __INITIALIZED__, LAUNCH_BROWSER, TRASH_REMOVE_SHOW, TRASH_ROTATE_LOGS, HOME_SEARCH_FOCUS, SORT_ARTICLE, showList, loadingShowList, UPDATE_SHOWS_ON_START, SHOW_UPDATE_HOUR, \
|
||||||
NEWZNAB_DATA, INDEXER_DEFAULT, INDEXER_TIMEOUT, USENET_RETENTION, TORRENT_DIR, \
|
NEWZNAB_DATA, INDEXER_DEFAULT, INDEXER_TIMEOUT, USENET_RETENTION, TORRENT_DIR, \
|
||||||
QUALITY_DEFAULT, FLATTEN_FOLDERS_DEFAULT, SUBTITLES_DEFAULT, STATUS_DEFAULT, WANTED_BEGIN_DEFAULT, WANTED_LATEST_DEFAULT, RECENTSEARCH_STARTUP, \
|
QUALITY_DEFAULT, FLATTEN_FOLDERS_DEFAULT, SUBTITLES_DEFAULT, STATUS_DEFAULT, WANTED_BEGIN_DEFAULT, WANTED_LATEST_DEFAULT, RECENTSEARCH_STARTUP, \
|
||||||
|
@ -740,6 +741,7 @@ def initialize(consoleLogging=True):
|
||||||
|
|
||||||
RECENTSEARCH_STARTUP = bool(check_setting_int(CFG, 'General', 'recentsearch_startup', 0))
|
RECENTSEARCH_STARTUP = bool(check_setting_int(CFG, 'General', 'recentsearch_startup', 0))
|
||||||
BACKLOG_STARTUP = bool(check_setting_int(CFG, 'General', 'backlog_startup', 0))
|
BACKLOG_STARTUP = bool(check_setting_int(CFG, 'General', 'backlog_startup', 0))
|
||||||
|
BACKLOG_NOFULL = bool(check_setting_int(CFG, 'General', 'backlog_nofull', 0))
|
||||||
SKIP_REMOVED_FILES = check_setting_int(CFG, 'General', 'skip_removed_files', 0)
|
SKIP_REMOVED_FILES = check_setting_int(CFG, 'General', 'skip_removed_files', 0)
|
||||||
|
|
||||||
USENET_RETENTION = check_setting_int(CFG, 'General', 'usenet_retention', 500)
|
USENET_RETENTION = check_setting_int(CFG, 'General', 'usenet_retention', 500)
|
||||||
|
@ -1498,6 +1500,7 @@ def save_config():
|
||||||
new_config['General']['allow_high_priority'] = int(ALLOW_HIGH_PRIORITY)
|
new_config['General']['allow_high_priority'] = int(ALLOW_HIGH_PRIORITY)
|
||||||
new_config['General']['recentsearch_startup'] = int(RECENTSEARCH_STARTUP)
|
new_config['General']['recentsearch_startup'] = int(RECENTSEARCH_STARTUP)
|
||||||
new_config['General']['backlog_startup'] = int(BACKLOG_STARTUP)
|
new_config['General']['backlog_startup'] = int(BACKLOG_STARTUP)
|
||||||
|
new_config['General']['backlog_nofull'] = int(BACKLOG_NOFULL)
|
||||||
new_config['General']['skip_removed_files'] = int(SKIP_REMOVED_FILES)
|
new_config['General']['skip_removed_files'] = int(SKIP_REMOVED_FILES)
|
||||||
new_config['General']['quality_default'] = int(QUALITY_DEFAULT)
|
new_config['General']['quality_default'] = int(QUALITY_DEFAULT)
|
||||||
new_config['General']['status_default'] = int(STATUS_DEFAULT)
|
new_config['General']['status_default'] = int(STATUS_DEFAULT)
|
||||||
|
|
|
@ -176,14 +176,14 @@ class BacklogSearcher:
|
||||||
limited_from_date = datetime.date.today() - datetime.timedelta(days=sickbeard.BACKLOG_DAYS)
|
limited_from_date = datetime.date.today() - datetime.timedelta(days=sickbeard.BACKLOG_DAYS)
|
||||||
|
|
||||||
limited_backlog = False
|
limited_backlog = False
|
||||||
if not which_shows and torrent_only:
|
if not which_shows and (torrent_only or sickbeard.BACKLOG_NOFULL):
|
||||||
logger.log(u'Running limited backlog for episodes missed during the last %s day(s)' %
|
logger.log(u'Running limited backlog for episodes missed during the last %s day(s)' %
|
||||||
str(sickbeard.BACKLOG_DAYS))
|
str(sickbeard.BACKLOG_DAYS))
|
||||||
from_date = limited_from_date
|
from_date = limited_from_date
|
||||||
limited_backlog = True
|
limited_backlog = True
|
||||||
|
|
||||||
runparts = []
|
runparts = []
|
||||||
if standard_backlog and not torrent_only:
|
if standard_backlog and not torrent_only and not sickbeard.BACKLOG_NOFULL:
|
||||||
my_db = db.DBConnection('cache.db')
|
my_db = db.DBConnection('cache.db')
|
||||||
sql_result = my_db.select('SELECT * FROM backlogparts WHERE part in (SELECT MIN(part) FROM backlogparts)')
|
sql_result = my_db.select('SELECT * FROM backlogparts WHERE part in (SELECT MIN(part) FROM backlogparts)')
|
||||||
if sql_result:
|
if sql_result:
|
||||||
|
@ -211,7 +211,7 @@ class BacklogSearcher:
|
||||||
wanted_list.append(w)
|
wanted_list.append(w)
|
||||||
|
|
||||||
parts = []
|
parts = []
|
||||||
if standard_backlog and not torrent_only and not continued_backlog:
|
if standard_backlog and not torrent_only and not continued_backlog and not sickbeard.BACKLOG_NOFULL:
|
||||||
fullbacklogparts = sum([len(w) for w in wanted_list if w]) // sickbeard.BACKLOG_FREQUENCY
|
fullbacklogparts = sum([len(w) for w in wanted_list if w]) // sickbeard.BACKLOG_FREQUENCY
|
||||||
h_part = []
|
h_part = []
|
||||||
counter = 0
|
counter = 0
|
||||||
|
@ -250,7 +250,7 @@ class BacklogSearcher:
|
||||||
if standard_backlog and not torrent_only and limited_wanted_list:
|
if standard_backlog and not torrent_only and limited_wanted_list:
|
||||||
self.add_backlog_item(limited_wanted_list, standard_backlog, True, forced, torrent_only)
|
self.add_backlog_item(limited_wanted_list, standard_backlog, True, forced, torrent_only)
|
||||||
|
|
||||||
if standard_backlog and not torrent_only and not continued_backlog:
|
if standard_backlog and not sickbeard.BACKLOG_NOFULL and not torrent_only and not continued_backlog:
|
||||||
cl = ([], [['DELETE FROM backlogparts']])[len(parts) > 1]
|
cl = ([], [['DELETE FROM backlogparts']])[len(parts) > 1]
|
||||||
for i, l in enumerate(parts):
|
for i, l in enumerate(parts):
|
||||||
if 0 == i:
|
if 0 == i:
|
||||||
|
|
|
@ -4483,7 +4483,8 @@ class ConfigSearch(Config):
|
||||||
download_propers=None, check_propers_interval=None, allow_high_priority=None,
|
download_propers=None, check_propers_interval=None, allow_high_priority=None,
|
||||||
torrent_dir=None, torrent_username=None, torrent_password=None, torrent_host=None,
|
torrent_dir=None, torrent_username=None, torrent_password=None, torrent_host=None,
|
||||||
torrent_label=None, torrent_path=None, torrent_verify_cert=None,
|
torrent_label=None, torrent_path=None, torrent_verify_cert=None,
|
||||||
torrent_seed_time=None, torrent_paused=None, torrent_high_bandwidth=None, ignore_words=None, require_words=None):
|
torrent_seed_time=None, torrent_paused=None, torrent_high_bandwidth=None, ignore_words=None, require_words=None,
|
||||||
|
backlog_nofull=None):
|
||||||
|
|
||||||
results = []
|
results = []
|
||||||
|
|
||||||
|
@ -4500,6 +4501,11 @@ class ConfigSearch(Config):
|
||||||
sickbeard.search_backlog.BacklogSearcher.change_backlog_parts(old_backlog_frequency, sickbeard.BACKLOG_FREQUENCY)
|
sickbeard.search_backlog.BacklogSearcher.change_backlog_parts(old_backlog_frequency, sickbeard.BACKLOG_FREQUENCY)
|
||||||
sickbeard.BACKLOG_DAYS = config.to_int(backlog_days, default=7)
|
sickbeard.BACKLOG_DAYS = config.to_int(backlog_days, default=7)
|
||||||
|
|
||||||
|
sickbeard.BACKLOG_NOFULL = bool(config.checkbox_to_value(backlog_nofull))
|
||||||
|
if sickbeard.BACKLOG_NOFULL:
|
||||||
|
my_db = db.DBConnection('cache.db')
|
||||||
|
my_db.action('DELETE FROM backlogparts')
|
||||||
|
|
||||||
sickbeard.USE_NZBS = config.checkbox_to_value(use_nzbs)
|
sickbeard.USE_NZBS = config.checkbox_to_value(use_nzbs)
|
||||||
sickbeard.USE_TORRENTS = config.checkbox_to_value(use_torrents)
|
sickbeard.USE_TORRENTS = config.checkbox_to_value(use_torrents)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue