mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
* Added EXIF extracting in the backend * Added EXIF displaying on `image_viewer_page.dart` * Added Icon for backup option not enable
26 lines
674 B
TypeScript
26 lines
674 B
TypeScript
import { InjectQueue } from '@nestjs/bull/dist/decorators';
|
|
import { Injectable } from '@nestjs/common';
|
|
import { Queue } from 'bull';
|
|
import { randomUUID } from 'node:crypto';
|
|
import { AssetEntity } from '../../api-v1/asset/entities/asset.entity';
|
|
|
|
@Injectable()
|
|
export class BackgroundTaskService {
|
|
constructor(
|
|
@InjectQueue('background-task')
|
|
private backgroundTaskQueue: Queue,
|
|
) {}
|
|
|
|
async extractExif(savedAsset: AssetEntity, fileName: string, fileSize: number) {
|
|
const job = await this.backgroundTaskQueue.add(
|
|
'extract-exif',
|
|
{
|
|
savedAsset,
|
|
fileName,
|
|
fileSize,
|
|
},
|
|
{ jobId: randomUUID() },
|
|
);
|
|
}
|
|
}
|