mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-04 03:27:09 -05:00 
			
		
		
		
	fix(server): include archived images in face detection (#8892)
This commit is contained in:
		
							parent
							
								
									a4f805e99b
								
							
						
					
					
						commit
						8573c84605
					
				@ -292,7 +292,7 @@ export class PersonService {
 | 
			
		||||
 | 
			
		||||
    const assetPagination = usePagination(JOBS_ASSET_PAGINATION_SIZE, (pagination) => {
 | 
			
		||||
      return force
 | 
			
		||||
        ? this.assetRepository.getAll(pagination, { orderDirection: 'DESC', withFaces: true })
 | 
			
		||||
        ? this.assetRepository.getAll(pagination, { orderDirection: 'DESC', withFaces: true, withArchived: true })
 | 
			
		||||
        : this.assetRepository.getWithout(pagination, WithoutProperty.FACES);
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
@ -424,7 +424,7 @@ export class PersonService {
 | 
			
		||||
 | 
			
		||||
    this.logger.debug(`Face ${id} has ${matches.length} matches`);
 | 
			
		||||
 | 
			
		||||
    const isCore = matches.length >= machineLearning.facialRecognition.minFaces;
 | 
			
		||||
    const isCore = matches.length >= machineLearning.facialRecognition.minFaces && !face.asset.isArchived;
 | 
			
		||||
    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 } });
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user