update method for plexAPI 4.3.0

This commit is contained in:
meisnate12 2021-01-26 01:25:05 -05:00
parent 2a16d09a6c
commit 9d5079db4a
2 changed files with 3 additions and 4 deletions

View file

@ -492,7 +492,7 @@ class Config:
if sync_collection or collectionless:
logger.info("Sync Mode: sync")
if collection_obj:
for item in collection_obj.children:
for item in collection_obj.items():
map[item.ratingKey] = item
else:
logger.info("Sync Mode: append")
@ -856,7 +856,7 @@ class Config:
items = library.Plex.all()
items_found += len(items)
elif method == "plex_collection":
items = value.children
items = value.items()
items_found += len(items)
elif method == "plex_search":
search_terms = {}

View file

@ -186,8 +186,7 @@ class PlexAPI:
def add_to_collection(self, collection, items, filters, map={}):
name = collection.title if isinstance(collection, Collections) else collection
collection_items = collection.children if isinstance(collection, Collections) else []
collection_items = collection.items() if isinstance(collection, Collections) else []
total = len(items)
max_length = len(str(total))
length = 0