Skip to content

Commit

Permalink
feat: 🎉 ✨ Scanning in Emby users now attaches connect email as user e…
Browse files Browse the repository at this point in the history
…mail
  • Loading branch information
JamsRepos committed Apr 22, 2024
1 parent 062bc6b commit 46d6f22
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/wizarr-backend/wizarr_backend/helpers/emby.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,9 @@ def sync_emby_users(server_api_key: Optional[str] = None, server_url: Optional[s
# If emby_users.id not in database_users.token, add to database
for emby_user in emby_users:
if str(emby_user["Id"]) not in [str(database_user.token) for database_user in database_users]:
create_user(username=emby_user["Name"], token=emby_user["Id"])
# Check to see if user has a connect username, if not set to None
email = emby_user["ConnectUserName"] if "ConnectUserName" in emby_user else None
create_user(username=emby_user["Name"], token=emby_user["Id"], email=email)
info(f"User {emby_user['Name']} successfully imported to database.")

# If database_users.token not in emby_users.id, delete from database
Expand Down

0 comments on commit 46d6f22

Please sign in to comment.