|
|
@ -725,8 +725,8 @@ class Plex:
|
|
|
|
key = builder.filter_translation[attr] if attr in builder.filter_translation else attr
|
|
|
|
key = builder.filter_translation[attr] if attr in builder.filter_translation else attr
|
|
|
|
if add_tags or remove_tags or sync_tags:
|
|
|
|
if add_tags or remove_tags or sync_tags:
|
|
|
|
_add_tags = add_tags if add_tags else []
|
|
|
|
_add_tags = add_tags if add_tags else []
|
|
|
|
_remove_tags = remove_tags if remove_tags else []
|
|
|
|
_remove_tags = [t.lower() for t in remove_tags] if remove_tags else []
|
|
|
|
_sync_tags = sync_tags if sync_tags else []
|
|
|
|
_sync_tags = [t.lower() for t in sync_tags] if sync_tags else []
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
_item_tags = [item_tag.tag.lower() for item_tag in getattr(obj, key)]
|
|
|
|
_item_tags = [item_tag.tag.lower() for item_tag in getattr(obj, key)]
|
|
|
|
except BadRequest:
|
|
|
|
except BadRequest:
|
|
|
@ -738,11 +738,11 @@ class Plex:
|
|
|
|
if _add:
|
|
|
|
if _add:
|
|
|
|
updated = True
|
|
|
|
updated = True
|
|
|
|
self.query_data(getattr(obj, f"add{attr.capitalize()}"), _add)
|
|
|
|
self.query_data(getattr(obj, f"add{attr.capitalize()}"), _add)
|
|
|
|
logger.info(f"Detail: {attr.capitalize()} {_add} added")
|
|
|
|
logger.info(f"Detail: {attr.capitalize()} {util.compile_list(_add)} added")
|
|
|
|
if _remove:
|
|
|
|
if _remove:
|
|
|
|
updated = True
|
|
|
|
updated = True
|
|
|
|
self.query_data(getattr(obj, f"remove{attr.capitalize()}"), _remove)
|
|
|
|
self.query_data(getattr(obj, f"remove{attr.capitalize()}"), _remove)
|
|
|
|
logger.info(f"Detail: {attr.capitalize()} {_remove} removed")
|
|
|
|
logger.info(f"Detail: {attr.capitalize()} {util.compile_list(_remove)} removed")
|
|
|
|
return updated
|
|
|
|
return updated
|
|
|
|
|
|
|
|
|
|
|
|
def update_item_from_assets(self, item, overlay=None, create=False):
|
|
|
|
def update_item_from_assets(self, item, overlay=None, create=False):
|
|
|
|