Change add 'hevc', 'x265' and some langs to Config Search/Episode Search/Ignore result with any word.

This commit is contained in:
JackDandy 2015-06-07 23:02:01 +01:00
parent 785a2451f4
commit 385b176eec
3 changed files with 25 additions and 5 deletions

View file

@ -31,6 +31,7 @@
* Remove feedcache implementation and library
* Change py2 exception clauses to py2/3 compatible clauses
* Add py2/3 regression testing for exception clauses
* Change add 'hevc', 'x265' and some langs to Config Search/Episode Search/Ignore result with any word.
[develop changelog]
* Update Requests library 2.7.0 (ab1f493) to 2.7.0 (8b5e457)

View file

@ -61,7 +61,7 @@ CFG = None
CONFIG_FILE = None
# This is the version of the config we EXPECT to find
CONFIG_VERSION = 11
CONFIG_VERSION = 12
# Default encryption version (0 for None)
ENCRYPTION_VERSION = 0
@ -473,8 +473,8 @@ EXTRA_SCRIPTS = []
GIT_PATH = None
IGNORE_WORDS = "german,french,core2hd,dutch,swedish,reenc,MrLss"
REQUIRE_WORDS = ""
IGNORE_WORDS = 'core2hd, hevc, MrLss, reenc, x265, danish, deutsch, dutch, flemish, french, german, italian, nordic, norwegian, portuguese, spanish, swedish, turkish'
REQUIRE_WORDS = ''
CALENDAR_UNPROTECTED = False

View file

@ -443,7 +443,8 @@ class ConfigMigrator():
8: 'Disable searches on start',
9: 'Rename pushbullet variables',
10: 'Reset backlog frequency to default',
11: 'Migrate anime split view to new layout'}
11: 'Migrate anime split view to new layout',
12: 'Add "hevc" and some non-english languages to ignore words if not found'}
def migrate_config(self):
""" Calls each successive migration until the config is the same version as SG expects """
@ -748,4 +749,22 @@ class ConfigMigrator():
if check_setting_int(self.config_obj, 'ANIME', 'anime_split_home', ''):
sickbeard.SHOWLIST_TAGVIEW = 'anime'
else:
sickbeard.SHOWLIST_TAGVIEW = 'default'
sickbeard.SHOWLIST_TAGVIEW = 'default'
def _migrate_v12(self):
# add words to ignore list and insert spaces to improve the ui config readability
words_to_add = ['hevc', 'reenc', 'x265', 'danish', 'deutsch', 'flemish', 'italian', 'nordic', 'norwegian', 'portuguese', 'spanish', 'turkish']
config_words = sickbeard.IGNORE_WORDS.split(',')
new_list = []
for new_word in words_to_add:
add_word = True
for ignore_word in config_words:
ignored = ignore_word.strip().lower()
if ignored and ignored not in new_list:
new_list += [ignored]
if re.search(r'(?i)%s' % new_word, ignored):
add_word = False
if add_word:
new_list += [new_word]
sickbeard.IGNORE_WORDS = ', '.join(sorted(new_list))