Skip to content

Commit

Permalink
Merge pull request #109 from Salvoxia/108-unable-to-use-share_with
Browse files Browse the repository at this point in the history
Fix: Regression: Fixed --share-with <name>=<role> syntax
  • Loading branch information
Salvoxia authored Jan 17, 2025
2 parents 50e4895 + cce0850 commit 93357eb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions immich_auto_album.py
Original file line number Diff line number Diff line change
Expand Up @@ -1502,9 +1502,15 @@ def set_album_properties_in_model(album_model_to_update: AlbumModel):
# Set share_with
if share_with:
for album_share_user in share_with:
# Resolve share user-specific share role syntax <name>=<role>
share_user_name, share_user_role = parse_separated_string(album_share_user, '=')
# Fallback to default
if share_user_role is None:
share_user_role = share_role

album_share_with = {
'user': album_share_user,
'role': share_role
'user': share_user_name,
'role': share_user_role
}
album_model_to_update.share_with.append(album_share_with)

Expand Down

0 comments on commit 93357eb

Please sign in to comment.