You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
12.[Dealing with External Library Changes](#dealing-with-external-library-changes)
30
+
11.[Mass Updating Album Properties](#mass-updating-album-properties)
31
+
12.[Automatic Archiving](#automatic-archiving)
32
+
13.[Dealing with External Library Changes](#dealing-with-external-library-changes)
32
33
33
34
## Usage
34
35
### Bare Python Script
@@ -115,8 +116,6 @@ This script is mostly based on the following original script: [REDVM/immich_auto
115
116
Timeout when requesting Immich API in seconds (default: 20)
116
117
--comments-and-likes-enabled
117
118
Pass this argument to enable comment and like functionality in all albums this script adds assets to. Cannot be used together with --comments-and-likes-disabled (default: False)
118
-
--comments-and-likes-disabled
119
-
Pass this argument to disable comment and like functionality in all albums this script adds assets to. Cannot be used together with --comments-and-likes-enabled (default: False)
120
119
--update-album-props-mode
121
120
Change how album properties are updated whenever new assets are added to an album. Album properties can either come from script arguments or the `.albumprops` file. Possible values:
122
121
0 = Do not change album properties.
@@ -439,17 +438,33 @@ Two arguments control this feature:
439
438
440
439
To share new albums with users `User A` and `User B` as `viewer`, use the following call:
Per default these share settings are applied once when the album is created and remain unchanged if an asset is added to an album later. If you want to override the share state whenever an asset is added to an album you can set`--update-album-props-mode` to `2`. Note that this will completely override all shared users, any changes made within Immich will be lost.
@@ -461,17 +476,39 @@ Two environment variables control this feature:
461
476
462
477
To share new albums with users `User A` and `User B` as `viewer`, use the following call:
Per default these share settings are applied once when the album is created and remain unchanged if an asset is added to an album later. If you want to override the share state whenever an asset is added to an album you can set`UPDATE_ALBUM_PROPS_MODE` to `2`. Note that this will completely override all shared users, any changes made within Immich will be lost.
@@ -580,6 +617,54 @@ share_with:
580
617
```
581
618
If the script is called with `--share-with "Mom"` and `--archive`, the album created from the folder the file above resides in will only be shared with user `Dad` using `editor` permissions, and assets will be archived. All other albums will be shared with user `Mom` (using `viewer` permissions, as defined by default) and assets will be archived.
582
619
620
+
## Mass Updating Album Properties
621
+
622
+
The script supports updating album properties after the fact, i.e. after they already have been created. Useful examples for this are mass sharing albums or enabling/disabling the "Comments and Likes" functionality. All album properties supported by `.albumprops` files (Refer to [Setting Album-Fine Properties](#setting-album-fine-properties)) are supported. They can be provided either by placing an `.albumprops` file in each folder, or by passing the appropriate argument to the script.
623
+
Updating already existing albums is done by setting the `--find-assets-in-albums` argument (or appropriate [environment variable](#environment-variables)) to discover assets that are already assigned to albums, and also setting the `--update-album-props-mode` argument ((or appropriate [environment variable](#environment-variables))).
624
+
When setting `--update-album-props-mode` to `1`, all album properties __except__ the shared status are updated. When setting it to `2`, the shared status is updated as well.
625
+
By applying `--path-filter` and/or `--ignore` options, it is possible to get a more fine granular control over the albums to update.
626
+
627
+
>[!IMPORTANT]
628
+
> The shared status is always updated to match exactly the users and roles provided to the script, the changes are not additive.
629
+
630
+
### Examples:
631
+
1. Share all albums (either existing or newly ) created from a `Birhtdays` folder with users `User A` and `User B`:
632
+
```bash
633
+
python3 ./immich_auto_album.py \
634
+
--find-assets-in-albums \
635
+
--update-album-props-mode 2 \
636
+
--share-with "User A" \
637
+
--share-with "User B" \
638
+
--path-filter "Birthdays/**" \
639
+
/path/to/external/lib \
640
+
https://immich.mydomain.com/api \
641
+
thisIsMyApiKeyCopiedFromImmichWebGui
642
+
```
643
+
644
+
To unshare the same albums simply run the same command without the `--share-with` arguments. The script will make sure all identified albums are shared with all people passed in `--share-with`, that is no-one.
645
+
```bash
646
+
python3 ./immich_auto_album.py \
647
+
--find-assets-in-albums \
648
+
--update-album-props-mode 2 \
649
+
--path-filter "Birthdays/**" \
650
+
/path/to/external/lib \
651
+
https://immich.mydomain.com/api \
652
+
thisIsMyApiKeyCopiedFromImmichWebGui
653
+
```
654
+
655
+
2. Disable comments and likes in all albums but the ones created from a `Birthdays` folder, without changing the "shared with" settings:
656
+
```bash
657
+
python3 ./immich_auto_album.py \
658
+
--find-assets-in-albums \
659
+
--update-album-props-mode 1 \
660
+
--disable-comments-an-likes \
661
+
--ignore "Birthdays/**" \
662
+
/path/to/external/lib \
663
+
https://immich.mydomain.com/api \
664
+
thisIsMyApiKeyCopiedFromImmichWebGui
665
+
```
666
+
667
+
583
668
## Automatic Archiving
584
669
585
670
In Immich, 'archiving' an image means to hide it from the main timeline.
@@ -619,6 +704,41 @@ Option `2` will first delete all "offline" assets automatically, then do the sam
619
704
620
705
It is up to you whether you want to use the full capabilities Sync Mode offers, parts of it or none.
621
706
An example for the Immich `docker-compose.yml` stack when using full Sync Mode might look like this:
707
+
708
+
### `docker-compose` example passing the API key as environment variable
709
+
```yml
710
+
#
711
+
# WARNING: Make sure to use the docker-compose.yml of the current release:
help="Pass this argument to enable comment and like functionality in all albums this script adds assets to. Cannot be used together with --comments-and-likes-disabled")
help="Pass this argument to disable comment and like functionality in all albums this script adds assets to. Cannot be used together with --comments-and-likes-enabled")
help="""Change how album properties are updated whenever new assets are added to an album. Album properties can either come from script arguments or the .albumprops file. Possible values:
1697
+
help="""Change how album properties are updated whenever new assets are added to an album. Album properties can either come from script arguments or the .albumprops file.
1698
+
Possible values:
1700
1699
0 = Do not change album properties.
1701
1700
1 = Only override album properties but do not change the share status.
1702
1701
2 = Override album properties and share status, this will remove all users from the album which are not in the SHARE_WITH list.""")
0 commit comments