Skip to content

Commit

Permalink
Change preferred words vars
Browse files Browse the repository at this point in the history
  • Loading branch information
medariox committed Feb 27, 2016
1 parent e1df51a commit cd6c717
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions gui/slick/views/config_search.mako
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
<label>
<span class="component-title">Preferred words</span>
<span class="component-desc">
<input type="text" name="prefered_words" value="${sickbeard.PREFERED_WORDS}" class="form-control input-sm input350" autocapitalize="off" />
<input type="text" name="preferred_words" value="${sickbeard.PREFERRED_WORDS}" class="form-control input-sm input350" autocapitalize="off" />
<div class="clear-left">results with one or more word from this list will be chosen over others<br>
separate words with a comma, e.g. "word1,word2,word3"
</div>
Expand All @@ -142,7 +142,7 @@
<span class="component-title">Undesired words</span>
<span class="component-desc">
<input type="text" name="undesired_words" value="${sickbeard.UNDESIRED_WORDS}" class="form-control input-sm input350" autocapitalize="off" />
<div class="clear-left">results withouth words from this list will be prefered<br>
<div class="clear-left">results withouth words from this list will be preferred<br>
separate words with a comma, e.g. "word1,word2,word3"
</div>
</span>
Expand Down
8 changes: 4 additions & 4 deletions sickbeard/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@

IGNORE_WORDS = "german,french,core2hd,dutch,swedish,reenc,MrLss"

PREFERED_WORDS = ""
PREFERRED_WORDS = ""

UNDESIRED_WORDS = ""

Expand Down Expand Up @@ -633,7 +633,7 @@ def initialize(consoleLogging=True): # pylint: disable=too-many-locals, too-man
NEWZBIN, NEWZBIN_USERNAME, NEWZBIN_PASSWORD, GIT_PATH, MOVE_ASSOCIATED_FILES, SYNC_FILES, POSTPONE_IF_SYNC_FILES, POSTPONE_IF_NO_SUBS, 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, THEME_NAME, \
POSTER_SORTBY, POSTER_SORTDIR, HISTORY_LIMIT, CREATE_MISSING_SHOW_DIRS, ADD_SHOWS_WO_DIR, \
METADATA_WDTV, METADATA_TIVO, METADATA_MEDE8ER, IGNORE_WORDS, PREFERED_WORDS, UNDESIRED_WORDS, TRACKERS_LIST, IGNORED_SUBS_LIST, REQUIRE_WORDS, CALENDAR_UNPROTECTED, CALENDAR_ICONS, NO_RESTART, \
METADATA_WDTV, METADATA_TIVO, METADATA_MEDE8ER, IGNORE_WORDS, PREFERRED_WORDS, UNDESIRED_WORDS, TRACKERS_LIST, IGNORED_SUBS_LIST, REQUIRE_WORDS, CALENDAR_UNPROTECTED, CALENDAR_ICONS, NO_RESTART, \
USE_SUBTITLES, SUBTITLES_LANGUAGES, SUBTITLES_DIR, SUBTITLES_SERVICES_LIST, SUBTITLES_SERVICES_ENABLED, SUBTITLES_HISTORY, SUBTITLES_FINDER_FREQUENCY, SUBTITLES_MULTI, SUBTITLES_DOWNLOAD_IN_PP, SUBTITLES_KEEP_ONLY_WANTED, EMBEDDED_SUBTITLES_ALL, SUBTITLES_EXTRA_SCRIPTS, SUBTITLES_PERFECT_MATCH, subtitlesFinderScheduler, \
SUBTITLES_HEARING_IMPAIRED, ADDIC7ED_USER, ADDIC7ED_PASS, LEGENDASTV_USER, LEGENDASTV_PASS, OPENSUBTITLES_USER, OPENSUBTITLES_PASS, \
USE_FAILED_DOWNLOADS, DELETE_FAILED, ANON_REDIRECT, LOCALHOST_IP, DEBUG, DBDEBUG, DEFAULT_PAGE, PROXY_SETTING, PROXY_INDEXERS, \
Expand Down Expand Up @@ -1207,7 +1207,7 @@ def path_leaf(path):
GIT_PATH = check_setting_str(CFG, 'General', 'git_path', '')

IGNORE_WORDS = check_setting_str(CFG, 'General', 'ignore_words', IGNORE_WORDS)
PREFERED_WORDS = check_setting_str(CFG, 'General', 'prefered_words', PREFERED_WORDS)
PREFERRED_WORDS = check_setting_str(CFG, 'General', 'preferred_words', PREFERRED_WORDS)
UNDESIRED_WORDS = check_setting_str(CFG, 'General', 'undesired_words', UNDESIRED_WORDS)
TRACKERS_LIST = check_setting_str(CFG, 'General', 'trackers_list', TRACKERS_LIST)
REQUIRE_WORDS = check_setting_str(CFG, 'General', 'require_words', REQUIRE_WORDS)
Expand Down Expand Up @@ -1755,7 +1755,7 @@ def save_config(): # pylint: disable=too-many-statements, too-many-branches
new_config['General']['extra_scripts'] = '|'.join(EXTRA_SCRIPTS)
new_config['General']['git_path'] = GIT_PATH
new_config['General']['ignore_words'] = IGNORE_WORDS
new_config['General']['prefered_words'] = PREFERED_WORDS
new_config['General']['preferred_words'] = PREFERRED_WORDS
new_config['General']['undesired_words'] = UNDESIRED_WORDS
new_config['General']['trackers_list'] = TRACKERS_LIST
new_config['General']['require_words'] = REQUIRE_WORDS
Expand Down
10 changes: 5 additions & 5 deletions sickbeard/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,9 @@ def pickBestResult(results, show): # pylint: disable=too-many-branches
cur_result.provider.name):
logger.log(cur_result.name + u" has previously failed, rejecting it")
continue
prefered_words = ''
if sickbeard.PREFERED_WORDS:
prefered_words = sickbeard.PREFERED_WORDS.lower().split(',')
preferred_words = ''
if sickbeard.PREFERRED_WORDS:
preferred_words = sickbeard.PREFERRED_WORDS.lower().split(',')
undesired_words = ''
if sickbeard.UNDESIRED_WORDS:
undesired_words = sickbeard.UNDESIRED_WORDS.lower().split(',')
Expand All @@ -260,7 +260,7 @@ def pickBestResult(results, show): # pylint: disable=too-many-branches
elif cur_result.quality in anyQualities and bestResult.quality not in bestQualities and bestResult.quality < cur_result.quality:
bestResult = cur_result
elif bestResult.quality == cur_result.quality:
if any(ext in cur_result.name.lower() for ext in prefered_words):
if any(ext in cur_result.name.lower() for ext in preferred_words):
logger.log(u"Preferring " + cur_result.name + " (preferred words)")
bestResult = cur_result
if "proper" in cur_result.name.lower() or "real" in cur_result.name.lower() or "repack" in cur_result.name.lower():
Expand Down Expand Up @@ -756,4 +756,4 @@ def searchProviders(show, episodes, manualSearch=False, downCurQuality=False):

# Remove provider from thread name before return results
threading.currentThread().name = origThreadName
return finalResults
return finalResults
4 changes: 2 additions & 2 deletions sickbeard/webserve.py
Original file line number Diff line number Diff line change
Expand Up @@ -4061,7 +4061,7 @@ def saveSearch(self, use_nzbs=None, use_torrents=None, nzb_dir=None, sab_usernam
torrent_dir=None, torrent_username=None, torrent_password=None, torrent_host=None,
torrent_label=None, torrent_label_anime=None, torrent_path=None, torrent_verify_cert=None,
torrent_seed_time=None, torrent_paused=None, torrent_high_bandwidth=None,
torrent_rpcurl=None, torrent_auth_type=None, ignore_words=None, prefered_words=None, undesired_words=None, trackers_list=None, require_words=None, ignored_subs_list=None):
torrent_rpcurl=None, torrent_auth_type=None, ignore_words=None, preferred_words=None, undesired_words=None, trackers_list=None, require_words=None, ignored_subs_list=None):

results = []

Expand All @@ -4084,7 +4084,7 @@ def saveSearch(self, use_nzbs=None, use_torrents=None, nzb_dir=None, sab_usernam
sickbeard.USENET_RETENTION = try_int(usenet_retention, 500)

sickbeard.IGNORE_WORDS = ignore_words if ignore_words else ""
sickbeard.PREFERED_WORDS = prefered_words if prefered_words else ""
sickbeard.PREFERRED_WORDS = preferred_words if preferred_words else ""
sickbeard.UNDESIRED_WORDS = undesired_words if undesired_words else ""
sickbeard.TRACKERS_LIST = trackers_list if trackers_list else ""
sickbeard.REQUIRE_WORDS = require_words if require_words else ""
Expand Down

0 comments on commit cd6c717

Please sign in to comment.