Skip to content

Conversation

Chaoscontrol
Copy link

@Chaoscontrol Chaoscontrol commented Jul 25, 2025

Summary

Added a new --include-shared-album option to the from-google-photos sub-command, similar to the existing --include-partner option.
Added a new --shared-album-tag option to tag the same items.

Changes

  • 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)
  • Add --shared-album-tag CLI flag (default: true)
  • Update asset filtering logic to respect the new flag
  • Update documentation in readme.md

Usage

Users can now exclude photos from shared albums during import:

immich-go upload from-google-photos --include-shared-album=false /path/to/takeout

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.

- 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.
@Chaoscontrol Chaoscontrol changed the title feat: Add --include-shared-album option for Google Photos import feat: Add --include-shared-album and --shared-album-tag options for Google Photos import Jul 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant