mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-01 00:43:37 +00:00
Change add 'hevc', 'x265' and some langs to Config Search/Episode Search/Ignore result with any word.
This commit is contained in:
parent
785a2451f4
commit
385b176eec
3 changed files with 25 additions and 5 deletions
|
@ -31,6 +31,7 @@
|
||||||
* Remove feedcache implementation and library
|
* Remove feedcache implementation and library
|
||||||
* Change py2 exception clauses to py2/3 compatible clauses
|
* Change py2 exception clauses to py2/3 compatible clauses
|
||||||
* Add py2/3 regression testing for exception 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]
|
[develop changelog]
|
||||||
* Update Requests library 2.7.0 (ab1f493) to 2.7.0 (8b5e457)
|
* Update Requests library 2.7.0 (ab1f493) to 2.7.0 (8b5e457)
|
||||||
|
|
|
@ -61,7 +61,7 @@ CFG = None
|
||||||
CONFIG_FILE = None
|
CONFIG_FILE = None
|
||||||
|
|
||||||
# This is the version of the config we EXPECT to find
|
# This is the version of the config we EXPECT to find
|
||||||
CONFIG_VERSION = 11
|
CONFIG_VERSION = 12
|
||||||
|
|
||||||
# Default encryption version (0 for None)
|
# Default encryption version (0 for None)
|
||||||
ENCRYPTION_VERSION = 0
|
ENCRYPTION_VERSION = 0
|
||||||
|
@ -473,8 +473,8 @@ EXTRA_SCRIPTS = []
|
||||||
|
|
||||||
GIT_PATH = None
|
GIT_PATH = None
|
||||||
|
|
||||||
IGNORE_WORDS = "german,french,core2hd,dutch,swedish,reenc,MrLss"
|
IGNORE_WORDS = 'core2hd, hevc, MrLss, reenc, x265, danish, deutsch, dutch, flemish, french, german, italian, nordic, norwegian, portuguese, spanish, swedish, turkish'
|
||||||
REQUIRE_WORDS = ""
|
REQUIRE_WORDS = ''
|
||||||
|
|
||||||
CALENDAR_UNPROTECTED = False
|
CALENDAR_UNPROTECTED = False
|
||||||
|
|
||||||
|
|
|
@ -443,7 +443,8 @@ class ConfigMigrator():
|
||||||
8: 'Disable searches on start',
|
8: 'Disable searches on start',
|
||||||
9: 'Rename pushbullet variables',
|
9: 'Rename pushbullet variables',
|
||||||
10: 'Reset backlog frequency to default',
|
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):
|
def migrate_config(self):
|
||||||
""" Calls each successive migration until the config is the same version as SG expects """
|
""" 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', ''):
|
if check_setting_int(self.config_obj, 'ANIME', 'anime_split_home', ''):
|
||||||
sickbeard.SHOWLIST_TAGVIEW = 'anime'
|
sickbeard.SHOWLIST_TAGVIEW = 'anime'
|
||||||
else:
|
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))
|
||||||
|
|
Loading…
Reference in a new issue