diff --git a/CHANGES.md b/CHANGES.md index 855484dd..adc46645 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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) diff --git a/sickbeard/__init__.py b/sickbeard/__init__.py index a77a2a97..703f88fd 100755 --- a/sickbeard/__init__.py +++ b/sickbeard/__init__.py @@ -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 diff --git a/sickbeard/config.py b/sickbeard/config.py index ef7337d2..ebeeb6c9 100644 --- a/sickbeard/config.py +++ b/sickbeard/config.py @@ -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' \ No newline at end of file + 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))