mirror of
https://github.com/immich-app/immich.git
synced 2026-03-01 18:19:10 +03:00
feat(server): visibility column (#17939)
* feat: private view * pr feedback * sql generation * feat: visibility column * fix: set visibility value as the same as the still part after unlinked live photos * fix: test * pr feedback
This commit is contained in:
@@ -26,6 +26,7 @@ import {
|
||||
} from 'src/dtos/person.dto';
|
||||
import {
|
||||
AssetType,
|
||||
AssetVisibility,
|
||||
CacheControl,
|
||||
ImageFormat,
|
||||
JobName,
|
||||
@@ -296,7 +297,7 @@ export class PersonService extends BaseService {
|
||||
return JobStatus.FAILED;
|
||||
}
|
||||
|
||||
if (!asset.isVisible) {
|
||||
if (asset.visibility === AssetVisibility.HIDDEN) {
|
||||
return JobStatus.SKIPPED;
|
||||
}
|
||||
|
||||
@@ -484,7 +485,9 @@ export class PersonService extends BaseService {
|
||||
|
||||
this.logger.debug(`Face ${id} has ${matches.length} matches`);
|
||||
|
||||
const isCore = matches.length >= machineLearning.facialRecognition.minFaces && !face.asset.isArchived;
|
||||
const isCore =
|
||||
matches.length >= machineLearning.facialRecognition.minFaces &&
|
||||
face.asset.visibility === AssetVisibility.TIMELINE;
|
||||
if (!isCore && !deferred) {
|
||||
this.logger.debug(`Deferring non-core face ${id} for later processing`);
|
||||
await this.jobRepository.queue({ name: JobName.FACIAL_RECOGNITION, data: { id, deferred: true } });
|
||||
|
||||
Reference in New Issue
Block a user