From 4fe06ec64a24e314e1bb3092048140c0ae9a5b84 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Tue, 25 May 2021 00:58:43 -0400 Subject: [PATCH] #275 fix for tags --- modules/meta.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/modules/meta.py b/modules/meta.py index bb41ab97..cec47994 100644 --- a/modules/meta.py +++ b/modules/meta.py @@ -132,14 +132,11 @@ class Metadata: elif f"{attr}.sync" in alias and group[alias[f"{attr}.sync"]] is None: logger.error(f"Metadata Error: {attr}.sync attribute is blank") elif attr in alias or f"{attr}.remove" in alias or f"{attr}.sync" in alias: - add_tags = group[alias[attr]] if attr in alias else None + add_tags = util.get_list(group[alias[attr]]) if attr in alias else [] if extra: - if add_tags: - add_tags.extend(extra) - else: - add_tags = extra - remove_tags = group[alias[f"{attr}.remove"]] if f"{attr}.remove" in alias else None - sync_tags = group[alias[f"{attr}.sync"]] if f"{attr}.sync" in alias else None + add_tags.extend(extra) + remove_tags = util.get_list(group[alias[f"{attr}.remove"]]) if f"{attr}.remove" in alias else None + sync_tags = util.get_list(group[alias[f"{attr}.sync"]]) if f"{attr}.sync" in alias else None return self.library.edit_tags(attr, obj, add_tags=add_tags, remove_tags=remove_tags, sync_tags=sync_tags, key=key) return False