diff --git a/server/src/infra/infra.utils.ts b/server/src/infra/infra.utils.ts index 2b274cb12a..d9eb823639 100644 --- a/server/src/infra/infra.utils.ts +++ b/server/src/infra/infra.utils.ts @@ -178,7 +178,10 @@ export function searchAssetBuilder( ); if (options.isNotInAlbum) { - builder.leftJoin(`${builder.alias}.albums`, 'albums').andWhere('albums.id IS NULL'); + builder + .leftJoin(`${builder.alias}.albums`, 'albums') + .andWhere('albums.id IS NULL') + .andWhere(`${builder.alias}.isVisible = true`); } if (options.withFaces || options.withPeople) {