feat: Add --include-shared-album and --shared-album-tag options for Google Photos import#1017
Open
Chaoscontrol wants to merge 4 commits intosimulot:mainfrom
Open
feat: Add --include-shared-album and --shared-album-tag options for Google Photos import#1017Chaoscontrol wants to merge 4 commits intosimulot:mainfrom
Chaoscontrol wants to merge 4 commits intosimulot:mainfrom
Conversation
- Add FromSharedAlbum field to GoogleMetaData, Metadata, and Asset structs - Add isSharedAlbum() method to detect shared album assets - Add --include-shared-album CLI flag (default: true) - Update asset filtering logic to respect the new flag - Update documentation in readme.md This option allows users to exclude photos from shared albums during import, similar to how --include-partner works for partner photos.
Accidentally removed these important calls when adding FromSharedAlbum field. These calls are needed to preserve album and tag information from metadata.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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-albumoption to thefrom-google-photossub-command, similar to the existing--include-partneroption.Added a new
--shared-album-tagoption to tag the same items.Changes
FromSharedAlbumfield toGoogleMetaData,Metadata, andAssetstructsisSharedAlbum()method to detect shared album assets--include-shared-albumCLI flag (default: true)--shared-album-tagCLI flag (default: true)readme.mdUsage
Users can now exclude photos from shared albums during import:
Testing
The feature follows the same pattern as
--include-partnerand 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.