Skip to content

folder-as-album = 'TOP' for importing only top level folder names as albums - #1404

Open
t00 wants to merge 1 commit into
simulot:developfrom
t00:feature/top-folder
Open

t00 wants to merge 1 commit into
simulot:developfrom
t00:feature/top-folder

Conversation

@t00

@t00 t00 commented Jul 28, 2026

Copy link
Copy Markdown

Add TOP mode to --folder-as-album: fits nicely in already taken convention of specifying mode by name.

Adds a third value alongside FOLDER and PATH: TOP names the album after the top-level folder, so every asset below it, however deeply nested, lands in a single album rather than one album per leaf directory.

/photos/Vacation2020/Day1/img.jpg  ->  album "Vacation2020"
/photos/Vacation2020/Day2/img.jpg  ->  album "Vacation2020"

The album name is the first path segment relative to the folder given on the command line; files sitting directly in that folder use its own name, matching what FOLDER already does for the same case.

Previously this grouping was only reachable by invoking immich-go once per top-level folder with --into-album, which re-scanned and reconnected for each one.

The new value is accepted by AlbumFolderMode.Set, so it works from the command line, the configuration file and the IMMICH_GO_* environment variables alike. Documentation updated wherever the accepted values are listed.

Adds adapters/folder/folderCli_test.go covering flag parsing and text round-tripping - the first test file in this package.

@t00
t00 requested a review from simulot as a code owner July 28, 2026 00:51
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