Skip to content

Commit

Permalink
Merge pull request #236 from luigi311/logging
Browse files Browse the repository at this point in the history
More logging
  • Loading branch information
luigi311 authored Feb 23, 2025
2 parents 899a6b0 + c62809c commit 1b88ecf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/jellyfin_emby.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,10 @@ def get_libraries(self) -> dict[str, str]:
# Theres no way to get all libraries so individually get list of libraries from all users
users = self.get_users()

for _, user_id in users.items():
for user_name, user_id in users.items():
user_libraries: dict = self.query(f"/Users/{user_id}/Views", "get")
logger.debug(f"{self.server_type}: All Libraries for {user_name} {[library.get("Name") for library in user_libraries["Items"]]}")

for library in user_libraries["Items"]:
library_title = library["Name"]
library_type = library.get("CollectionType")
Expand Down
3 changes: 3 additions & 0 deletions src/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ def setup_libraries(
server_1_libraries = server_1.get_libraries()
server_2_libraries = server_2.get_libraries()

logger.debug(f"{server_1.server_type}: Libraries and types {server_1_libraries}")
logger.debug(f"{server_2.server_type}: Libraries and types {server_2_libraries}")

# Filter out all blacklist, whitelist libaries
filtered_server_1_libraries = filter_libaries(
server_1_libraries,
Expand Down
2 changes: 2 additions & 0 deletions src/plex.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ def __init__(
ssl_bypass=False,
session=None,
):
self.server_type = "Plex"
self.baseurl = baseurl
self.token = token
self.username = username
Expand Down Expand Up @@ -280,6 +281,7 @@ def get_libraries(self) -> dict[str, str]:
output = {}

libraries = self.plex.library.sections()
logger.debug(f"Plex: All Libraries {[library.title for library in libraries]}")

for library in libraries:
library_title = library.title
Expand Down

0 comments on commit 1b88ecf

Please sign in to comment.