mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor(server): imports and repository tokens (#1220)
* refactor: entity imports * refactor: rename user repository token * chore: merge imports * refactor: rename album repository token * refactor: rename asset repository token * refactor: rename tag repository token
This commit is contained in:
parent
f7d3c4b4ff
commit
d9fa6619e7
81 changed files with 130 additions and 151 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { AssetType } from '@app/database/entities/asset.entity';
|
||||
import { AssetType } from '@app/database';
|
||||
import {
|
||||
IAssetUploadedJob,
|
||||
IMetadataExtractionJob,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { AssetEntity } from '@app/database/entities/asset.entity';
|
||||
import { AssetEntity } from '@app/database';
|
||||
import { QueueNameEnum } from '@app/job';
|
||||
import { Process, Processor } from '@nestjs/bull';
|
||||
import { Logger } from '@nestjs/common';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { AssetEntity } from '@app/database/entities/asset.entity';
|
||||
import { SmartInfoEntity } from '@app/database/entities/smart-info.entity';
|
||||
import { AssetEntity } from '@app/database';
|
||||
import { SmartInfoEntity } from '@app/database';
|
||||
import { MachineLearningJobNameEnum, QueueNameEnum } from '@app/job';
|
||||
import { IMachineLearningJob } from '@app/job/interfaces/machine-learning.interface';
|
||||
import { Process, Processor } from '@nestjs/bull';
|
||||
|
|
@ -22,12 +22,9 @@ export class MachineLearningProcessor {
|
|||
async tagImage(job: Job<IMachineLearningJob>) {
|
||||
const { asset } = job.data;
|
||||
|
||||
const res = await axios.post(
|
||||
immich_machine_learning_url + '/image-classifier/tag-image',
|
||||
{
|
||||
thumbnailPath: asset.resizePath,
|
||||
},
|
||||
);
|
||||
const res = await axios.post(immich_machine_learning_url + '/image-classifier/tag-image', {
|
||||
thumbnailPath: asset.resizePath,
|
||||
});
|
||||
|
||||
if (res.status == 201 && res.data.length > 0) {
|
||||
const smartInfo = new SmartInfoEntity();
|
||||
|
|
@ -45,12 +42,9 @@ export class MachineLearningProcessor {
|
|||
try {
|
||||
const { asset }: { asset: AssetEntity } = job.data;
|
||||
|
||||
const res = await axios.post(
|
||||
immich_machine_learning_url + '/object-detection/detect-object',
|
||||
{
|
||||
thumbnailPath: asset.resizePath,
|
||||
},
|
||||
);
|
||||
const res = await axios.post(immich_machine_learning_url + '/object-detection/detect-object', {
|
||||
thumbnailPath: asset.resizePath,
|
||||
});
|
||||
|
||||
if (res.status == 201 && res.data.length > 0) {
|
||||
const smartInfo = new SmartInfoEntity();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { ImmichLogLevel } from '@app/common/constants/log-level.constant';
|
||||
import { AssetEntity } from '@app/database/entities/asset.entity';
|
||||
import { ExifEntity } from '@app/database/entities/exif.entity';
|
||||
import { AssetEntity, ExifEntity } from '@app/database';
|
||||
import {
|
||||
IExifExtractionProcessor,
|
||||
IVideoLengthExtractionProcessor,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { APP_UPLOAD_LOCATION } from '@app/common';
|
||||
import { AssetEntity } from '@app/database/entities/asset.entity';
|
||||
import { AssetEntity } from '@app/database';
|
||||
import { ImmichConfigService } from '@app/immich-config';
|
||||
import { QueueNameEnum, templateMigrationProcessorName, updateTemplateProcessorName } from '@app/job';
|
||||
import { StorageService } from '@app/storage';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { APP_UPLOAD_LOCATION } from '@app/common';
|
||||
import { AssetEntity, AssetType } from '@app/database/entities/asset.entity';
|
||||
import { AssetEntity, AssetType } from '@app/database';
|
||||
import {
|
||||
WebpGeneratorProcessor,
|
||||
generateJPEGThumbnailProcessorName,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { APP_UPLOAD_LOCATION, userUtils } from '@app/common';
|
||||
import { AssetEntity } from '@app/database/entities/asset.entity';
|
||||
import { UserEntity } from '@app/database/entities/user.entity';
|
||||
import { AssetEntity, UserEntity } from '@app/database';
|
||||
import { QueueNameEnum, userDeletionProcessorName } from '@app/job';
|
||||
import { IUserDeletionJob } from '@app/job/interfaces/user-deletion.interface';
|
||||
import { Process, Processor } from '@nestjs/bull';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { APP_UPLOAD_LOCATION } from '@app/common/constants';
|
||||
import { AssetEntity } from '@app/database/entities/asset.entity';
|
||||
import { AssetEntity } from '@app/database';
|
||||
import { QueueNameEnum } from '@app/job';
|
||||
import { mp4ConversionProcessorName } from '@app/job/constants/job-name.constant';
|
||||
import { IMp4ConversionProcessor } from '@app/job/interfaces/video-transcode.interface';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue