Skip library before erroring for multiple types.

This commit is contained in:
Luigi311
2023-01-27 10:43:50 -07:00
parent 7f9424260a
commit f08ec43507
2 changed files with 22 additions and 12 deletions

View File

@@ -366,16 +366,9 @@ class Jellyfin:
]
)
# If there are multiple types in library raise error
if len(types) > 1:
raise Exception(
f"Jellyfin: Library {library_title} has multiple types: {types}"
)
library_type = types.pop()
skip_reason = check_skip_logic(
library_title,
library_type,
types,
blacklist_library,
whitelist_library,
blacklist_library_type,
@@ -390,6 +383,13 @@ class Jellyfin:
)
continue
# If there are multiple types in library raise error
if len(types) > 1:
raise Exception(
f"Jellyfin: Library {library_title} has multiple types: {types}"
)
library_type = types.pop()
# Get watched for user
task = asyncio.ensure_future(
self.get_user_library_watched(