Skip to content

Add HideAssetsInOtherAlbums account setting - #707

Closed
adman234 wants to merge 1 commit into
immichFrame:mainfrom
adman234:hide-assets-in-other-albums-pr
Closed

adman234 wants to merge 1 commit into
immichFrame:mainfrom
adman234:hide-assets-in-other-albums-pr

Conversation

@adman234

@adman234 adman234 commented Sep 17, 2026 •

Copy link
Copy Markdown

Adds a checkbox option to skip assets that are also in any album not listed under Albums, including albums shared with the user.

This is needed because sometimes photos can be put into multiple albums by accident when immich syncs them, and I don't want photos in my "documents" folder to be shown on my immichframe.

The Immich mobile app's album sync only ever adds assets to albums, so a photo moved between device albums stays in both server albums. Today the only fix is listing every other album in ExcludedAlbums and keeping that list current as new albums appear.

The other albums are resolved when the excluded-album cache is filled, so new albums are picked up on the next refresh. The setting has no effect without Albums, where every album would count as "other".

Summary by CodeRabbit

  • New Features

    • Added an account setting to hide assets that also appear in albums outside the selected album list, including shared albums.
    • Added an administration checkbox for configuring this behavior.
    • The setting applies only when specific albums are selected and defaults to disabled.
  • Documentation

    • Added configuration guidance describing the setting and automatic updates when albums refresh.

Skips assets that are also in any album not listed under Albums, including
albums shared with the user. The Immich mobile app's album sync only ever
adds assets to albums, so a photo moved between device albums stays in both
server albums. Today the only fix is listing every other album in
ExcludedAlbums and keeping that list current as new albums appear.

The other albums are resolved when the excluded-album cache is filled, so
new albums are picked up on the next refresh. The setting has no effect
without Albums, where every album would count as "other".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 50c11493-3b02-4016-9449-a8388716da74

📥 Commits

Reviewing files that changed from the base of the PR and between 5f0c3c3 and bf09069.

📒 Files selected for processing (13)
  • ImmichFrame.Core.Tests/Logic/Pool/AlbumAssetsPoolTests.cs
  • ImmichFrame.Core.Tests/Logic/Pool/AllAssetsPoolTests.cs
  • ImmichFrame.Core/Helpers/AssetHelper.cs
  • ImmichFrame.Core/Interfaces/IServerSettings.cs
  • ImmichFrame.WebApi.Tests/Resources/TestV2.json
  • ImmichFrame.WebApi.Tests/Resources/TestV2.yml
  • ImmichFrame.WebApi/Models/ServerSettings.cs
  • docker/Settings.example.json
  • docker/Settings.example.yml
  • docs/docs/getting-started/configuration.md
  • immichFrame.Web/src/lib/components/admin/admin-fields.ts
  • immichFrame.Web/src/lib/immichFrameApi.ts
  • openApi/swagger.json

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

Adds HideAssetsInOtherAlbums to account settings and API surfaces. When enabled with selected albums, asset filtering also excludes assets from unselected albums. Tests cover shared albums, duplicate exclusions, disabled filtering, and empty selections.

Changes

Hide assets in other albums

Layer / File(s) Summary
Configuration and API contract
ImmichFrame.Core/Interfaces/IServerSettings.cs, ImmichFrame.WebApi/Models/ServerSettings.cs, openApi/swagger.json, immichFrame.Web/src/lib/..., docker/Settings.example.*, docs/docs/getting-started/configuration.md, ImmichFrame.WebApi.Tests/Resources/*
Adds HideAssetsInOtherAlbums to account settings, API schemas, generated client types, admin fields, examples, test resources, and configuration documentation.
Album exclusion filtering
ImmichFrame.Core/Helpers/AssetHelper.cs
When the setting is enabled and albums are selected, fetches all albums, adds unselected album IDs to configured exclusions, and removes duplicate IDs.
Filtering behavior validation
ImmichFrame.Core.Tests/Logic/Pool/AlbumAssetsPoolTests.cs, ImmichFrame.Core.Tests/Logic/Pool/AllAssetsPoolTests.cs
Tests filtering for unselected and shared albums, duplicate exclusions, disabled filtering, and empty album selections.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant AccountSettings
  participant AlbumAssetsPool
  participant AssetHelper
  participant ImmichApi
  AccountSettings->>AlbumAssetsPool: Enable HideAssetsInOtherAlbums
  AlbumAssetsPool->>AssetHelper: Resolve excluded album assets
  AssetHelper->>ImmichApi: GetAllAlbumsAsync
  ImmichApi-->>AssetHelper: Return selected and unselected albums
  AssetHelper-->>AlbumAssetsPool: Return distinct exclusion IDs
  AlbumAssetsPool-->>AccountSettings: Return filtered assets
Loading

Suggested reviewers: jw-ch

Merge Risk: ⚪ Minimal · up to bf090

The new setting is represented across configuration and UI surfaces and is guarded when no albums are selected; no actionable merge risk is established.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 11.11% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 7 files. (6 skipped: 6… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: adding the HideAssetsInOtherAlbums account setting.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 11.11% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 7 files. (6 skipped: 6 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@adman234

Copy link
Copy Markdown
Author

I should also mention:

Related: This works alongside #706 (the WhereExcludes speed fix). They touch different code and merge cleanly. Without #706, turning this on is as slow as a long ExcludedAlbums list (#669).

Testing: 4 new unit tests. On Linux CI in my fork, Core tests passed 88/88 and WebApi tests passed 26/26. In a benchmark with 8,000 selected assets and 30 other albums, one request took 81 s with this PR alone and 18 to 39 ms with #706 as well.

@adman234

Copy link
Copy Markdown
Author

#706 is merged now, so this is ready for review. HideAssetsInOtherAlbums relies on the faster WhereExcludes path from #706, so turning it on no longer carries the slowdown from #669. The branch still merges cleanly into main. Happy to rebase or change anything if needed.

@JW-CH

JW-CH commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

Hey, I reworked the whole Search to the new v2 Search. (#712)

Immich now handles most of the work with the albums, including a 'Not In Album'-Filter which should fix the issue you had and would make this PR obsolete. Sorry that I never replied to your PR, I missed it. You can check #712 out and see if that works for you :) Thank you for your time.

@adman234 adman234 closed this Sep 29, 2026
@adman234
adman234 deleted the hide-assets-in-other-albums-pr branch October 19, 2026 12:57
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.

2 participants