feat(upload): add --into-album to all upload subcommands - #1398
Open
Digital39999 wants to merge 2 commits into
Open
Digital39999 wants to merge 2 commits into
Digital39999 wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR centralizes the --into-album upload behavior by moving the flag to the upload parent command and applying the album override in the shared upload pipeline, so all upload subcommands can use it consistently.
Changes:
- Hoist
--into-albumto theuploadparent command and apply the override inUpCmd.handleGroup. - Remove duplicated
--into-albumwiring from folder and Google Photos adapters. - Update documentation for CLI usage, env vars, and config location (
[upload].into-albumandIMMICH_GO_UPLOAD_INTO_ALBUM).
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/upload-commands-overview.md | Documents --into-album for from-immich transfers. |
| docs/environment.md | Moves env var mapping to IMMICH_GO_UPLOAD_INTO_ALBUM and removes per-subcommand variants. |
| docs/configuration.md | Moves config key to [upload].into-album and updates examples. |
| docs/commands/upload.md | Adds --into-album destination option + example for upload from-immich. |
| app/upload/upload.go | Adds ImportIntoAlbum to UpCmd and registers --into-album as a persistent upload flag. |
| app/upload/run.go | Applies the album override centrally in handleGroup. |
| adapters/googlePhotos/googlephotos.go | Removes adapter-local forced album override; keeps album derivation when syncing albums. |
| adapters/googlePhotos/cmdFromGooglePhotos.go | Removes ImportIntoAlbum field from TakeoutCmd. |
| adapters/folder/run.go | Preserves mutual exclusion validation via flag lookup rather than adapter field. |
| adapters/folder/commands.go | Removes adapter-local --into-album flag registration. |
This branch has not been deployed
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.
The --into-album flag was wired separately in from-folder, from-icloud, and from-picasa, while from-immich and from-google-photos lacked it entirely. This hoists it onto the upload parent so all five subcommands get it, and removes the duplicated wiring from each adapter.
The override now runs in handleGroup instead of inside each adapter's Browse loop. Same place in the pipeline, just centralized.
Validation for --into-album + --folder-as-album is preserved on the folder-based subcommands.
Config files need a small update: if you had into-album under [upload.from-folder] (or icloud/picasa), move it to [upload]. The env var is now IMMICH_GO_UPLOAD_INTO_ALBUM.