diff --git a/sabnzbd/config.py b/sabnzbd/config.py index 625bce9a119..003d56e8d3e 100644 --- a/sabnzbd/config.py +++ b/sabnzbd/config.py @@ -463,7 +463,7 @@ def __init__(self, name, values): self.pp = OptionStr(name, 'pp', '', add=False) self.script = OptionStr(name, 'script', 'Default', add=False) self.dir = OptionDir(name, 'dir', add=False, create=False) - self.newzbin = OptionList(name, 'newzbin', add=False) + self.newzbin = OptionList(name, 'newzbin', add=False, validation=validate_single_tag) self.priority = OptionNumber(name, 'priority', DEFAULT_PRIORITY, add=False) self.set_dict(values) @@ -1102,6 +1102,16 @@ def validate_notempty(root, value, default): return None, default +def validate_single_tag(value): + """ Don't split single indexer tags like "TV > HD" + into ['TV', '>', 'HD'] + """ + if len(value) == 3: + if value[1] == '>': + return None, ' '.join(value) + return None, value + + def create_api_key(): """ Return a new randomized API_KEY """ # Create some values to seed md5