mirror of
https://github.com/moparisthebest/SickRage
synced 2025-01-05 19:08:02 -05:00
Merge pull request #849 from adam111316/global_required_words
Add global required words
This commit is contained in:
commit
a8767e0a51
@ -126,6 +126,21 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="field-pair">
|
||||||
|
<label class="nocheck clearfix">
|
||||||
|
<span class="component-title">Require Words</span>
|
||||||
|
<input type="text" name="require_words" value="$sickbeard.REQUIRE_WORDS" size="45" />
|
||||||
|
</label>
|
||||||
|
<label class="nocheck clearfix">
|
||||||
|
<span class="component-title"> </span>
|
||||||
|
<span class="component-desc">Comma separated words to check in episode search.</span>
|
||||||
|
</label>
|
||||||
|
<label class="nocheck clearfix">
|
||||||
|
<span class="component-title"> </span>
|
||||||
|
<span class="component-desc">Results not containing all words in the list won't be snatched.</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="field-pair">
|
<div class="field-pair">
|
||||||
<input type="checkbox" name="allow_high_priority" id="allow_high_priority" #if $sickbeard.ALLOW_HIGH_PRIORITY == True then "checked=\"checked\"" else ""# />
|
<input type="checkbox" name="allow_high_priority" id="allow_high_priority" #if $sickbeard.ALLOW_HIGH_PRIORITY == True then "checked=\"checked\"" else ""# />
|
||||||
<label class="clearfix" for="allow_high_priority">
|
<label class="clearfix" for="allow_high_priority">
|
||||||
|
@ -443,6 +443,7 @@ EXTRA_SCRIPTS = []
|
|||||||
GIT_PATH = None
|
GIT_PATH = None
|
||||||
|
|
||||||
IGNORE_WORDS = "german,french,core2hd,dutch,swedish,reenc,MrLss"
|
IGNORE_WORDS = "german,french,core2hd,dutch,swedish,reenc,MrLss"
|
||||||
|
REQUIRE_WORDS = ""
|
||||||
|
|
||||||
CALENDAR_UNPROTECTED = False
|
CALENDAR_UNPROTECTED = False
|
||||||
|
|
||||||
@ -494,7 +495,7 @@ def initialize(consoleLogging=True):
|
|||||||
USE_LISTVIEW, METADATA_XBMC, METADATA_XBMC_12PLUS, METADATA_MEDIABROWSER, METADATA_PS3, metadata_provider_dict, \
|
USE_LISTVIEW, METADATA_XBMC, METADATA_XBMC_12PLUS, METADATA_MEDIABROWSER, METADATA_PS3, metadata_provider_dict, \
|
||||||
NEWZBIN, NEWZBIN_USERNAME, NEWZBIN_PASSWORD, GIT_PATH, MOVE_ASSOCIATED_FILES, POSTPONE_IF_SYNC_FILES, dailySearchScheduler, NFO_RENAME, \
|
NEWZBIN, NEWZBIN_USERNAME, NEWZBIN_PASSWORD, GIT_PATH, MOVE_ASSOCIATED_FILES, POSTPONE_IF_SYNC_FILES, dailySearchScheduler, NFO_RENAME, \
|
||||||
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, \
|
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, \
|
||||||
METADATA_WDTV, METADATA_TIVO, METADATA_MEDE8ER, IGNORE_WORDS, CALENDAR_UNPROTECTED, CREATE_MISSING_SHOW_DIRS, \
|
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, \
|
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, \
|
||||||
AUTOPOSTPROCESSER_FREQUENCY, DEFAULT_AUTOPOSTPROCESSER_FREQUENCY, MIN_AUTOPOSTPROCESSER_FREQUENCY, \
|
AUTOPOSTPROCESSER_FREQUENCY, DEFAULT_AUTOPOSTPROCESSER_FREQUENCY, MIN_AUTOPOSTPROCESSER_FREQUENCY, \
|
||||||
@ -905,6 +906,7 @@ def initialize(consoleLogging=True):
|
|||||||
GIT_PATH = check_setting_str(CFG, 'General', 'git_path', '')
|
GIT_PATH = check_setting_str(CFG, 'General', 'git_path', '')
|
||||||
|
|
||||||
IGNORE_WORDS = check_setting_str(CFG, 'General', 'ignore_words', IGNORE_WORDS)
|
IGNORE_WORDS = check_setting_str(CFG, 'General', 'ignore_words', IGNORE_WORDS)
|
||||||
|
REQUIRE_WORDS = check_setting_str(CFG, 'General', 'require_words', REQUIRE_WORDS)
|
||||||
|
|
||||||
CALENDAR_UNPROTECTED = bool(check_setting_int(CFG, 'General', 'calendar_unprotected', 0))
|
CALENDAR_UNPROTECTED = bool(check_setting_int(CFG, 'General', 'calendar_unprotected', 0))
|
||||||
|
|
||||||
@ -1464,6 +1466,7 @@ def save_config():
|
|||||||
new_config['General']['extra_scripts'] = '|'.join(EXTRA_SCRIPTS)
|
new_config['General']['extra_scripts'] = '|'.join(EXTRA_SCRIPTS)
|
||||||
new_config['General']['git_path'] = GIT_PATH
|
new_config['General']['git_path'] = GIT_PATH
|
||||||
new_config['General']['ignore_words'] = IGNORE_WORDS
|
new_config['General']['ignore_words'] = IGNORE_WORDS
|
||||||
|
new_config['General']['require_words'] = REQUIRE_WORDS
|
||||||
new_config['General']['calendar_unprotected'] = int(CALENDAR_UNPROTECTED)
|
new_config['General']['calendar_unprotected'] = int(CALENDAR_UNPROTECTED)
|
||||||
|
|
||||||
new_config['Blackhole'] = {}
|
new_config['Blackhole'] = {}
|
||||||
|
@ -66,6 +66,16 @@ def filterBadReleases(name, parse=True):
|
|||||||
logger.DEBUG)
|
logger.DEBUG)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
# if any of the good strings aren't in the name then say no
|
||||||
|
if sickbeard.REQUIRE_WORDS:
|
||||||
|
require_words = sickbeard.REQUIRE_WORDS.split(',')
|
||||||
|
filters = [re.compile('(^|[\W_])%s($|[\W_])' % filter.strip(), re.I) for filter in require_words]
|
||||||
|
for regfilter in filters:
|
||||||
|
if not regfilter.search(name):
|
||||||
|
logger.log(u"Invalid scene release: " + name + " doesn't contain pattern: " + regfilter.pattern + ", ignoring it",
|
||||||
|
logger.DEBUG)
|
||||||
|
return False
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
@ -1632,7 +1632,7 @@ class ConfigSearch(MainHandler):
|
|||||||
backlog_startup=None, dailysearch_startup=None,
|
backlog_startup=None, dailysearch_startup=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):
|
torrent_seed_time=None, torrent_paused=None, torrent_high_bandwidth=None, ignore_words=None, require_words=None):
|
||||||
|
|
||||||
results = []
|
results = []
|
||||||
|
|
||||||
@ -1655,6 +1655,7 @@ class ConfigSearch(MainHandler):
|
|||||||
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 ""
|
||||||
|
sickbeard.REQUIRE_WORDS = require_words if require_words else ""
|
||||||
|
|
||||||
sickbeard.DOWNLOAD_PROPERS = config.checkbox_to_value(download_propers)
|
sickbeard.DOWNLOAD_PROPERS = config.checkbox_to_value(download_propers)
|
||||||
sickbeard.CHECK_PROPERS_INTERVAL = check_propers_interval
|
sickbeard.CHECK_PROPERS_INTERVAL = check_propers_interval
|
||||||
|
Loading…
Reference in New Issue
Block a user