diff --git a/couchpotato/core/helpers/variable.py b/couchpotato/core/helpers/variable.py index f38cf39c..53b71941 100644 --- a/couchpotato/core/helpers/variable.py +++ b/couchpotato/core/helpers/variable.py @@ -36,10 +36,18 @@ def mergeDicts(a, b): stack.append((current_dst[key], current_src[key])) elif isinstance(current_src[key], list) and isinstance(current_dst[key], list): current_dst[key].extend(current_src[key]) + current_dst[key] = removeListDuplicates(current_dst[key]) else: current_dst[key] = current_src[key] return dst +def removeListDuplicates(seq): + checked = [] + for e in seq: + if e not in checked: + checked.append(e) + return checked + def flattenList(l): if isinstance(l, list): return sum(map(flattenList, l))