additional exception for previously deleted items.

This commit is contained in:
blacktwin 2021-01-06 13:17:21 -05:00
parent 3421661e22
commit 592029cee3

View File

@ -309,7 +309,7 @@ def plex_deletion(items, libraries, toggleDeletion):
plex_item = plex.fetchItem(int(item.rating_key))
plex_item.delete()
print("Item: {} was deleted".format(plex_item.title))
except NotFound:
except (NotFound, AttributeError):
print("Item: {} may already have been deleted.".format(item))
for _library in libraries:
section = plex.library.sectionByID(_library.key)