feat: Add --include-shared-album and --shared-album-tag options for Google Photos import #1017
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Added a new
--include-shared-album
option to thefrom-google-photos
sub-command, similar to the existing--include-partner
option.Added a new
--shared-album-tag
option to tag the same items.Changes
FromSharedAlbum
field toGoogleMetaData
,Metadata
, andAsset
structsisSharedAlbum()
method to detect shared album assets--include-shared-album
CLI flag (default: true)--shared-album-tag
CLI flag (default: true)readme.md
Usage
Users can now exclude photos from shared albums during import:
Testing
The feature follows the same pattern as
--include-partner
and should work with Google Photos takeouts that contain shared album metadata.You can see it tested and working here:
immich-go_2025-07-25_23-35-30.log Log without the new function in use: 211 uploads.
immich-go_2025-07-25_23-35-59.log Log using the new function: 6 uploads, rest discarded (
reason=discarding shared album file
)Note
I generated this PR using AI and vibe coding. I have no clue of Go. I've made sure it made only the necessary additions, and just copying an existing identical feature. The first commit made a mistake and removed a couple lines, and the 2nd commit was just to fix that. No lines deleted, only new function added.
I did review the changes made to all files and made sure to test it properly before submitting.