mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
feat(server,web): libraries (#3124)
* feat: libraries Co-authored-by: Jason Rasmussen <jrasm91@gmail.com> Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
committed by
GitHub
parent
816db700e1
commit
acdc66413c
@@ -4,6 +4,7 @@ import {
|
||||
IDeleteFilesJob,
|
||||
JobName,
|
||||
JobService,
|
||||
LibraryService,
|
||||
MediaService,
|
||||
MetadataService,
|
||||
PersonService,
|
||||
@@ -14,6 +15,7 @@ import {
|
||||
SystemConfigService,
|
||||
UserService,
|
||||
} from '@app/domain';
|
||||
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import { MetadataExtractionProcessor } from './processors/metadata-extraction.processor';
|
||||
|
||||
@@ -37,6 +39,7 @@ export class AppService {
|
||||
private systemConfigService: SystemConfigService,
|
||||
private userService: UserService,
|
||||
private auditService: AuditService,
|
||||
private libraryService: LibraryService,
|
||||
) {}
|
||||
|
||||
async init() {
|
||||
@@ -77,6 +80,13 @@ export class AppService {
|
||||
[JobName.QUEUE_SIDECAR]: (data) => this.metadataService.handleQueueSidecar(data),
|
||||
[JobName.SIDECAR_DISCOVERY]: (data) => this.metadataService.handleSidecarDiscovery(data),
|
||||
[JobName.SIDECAR_SYNC]: () => this.metadataService.handleSidecarSync(),
|
||||
[JobName.LIBRARY_SCAN_ASSET]: (data) => this.libraryService.handleAssetRefresh(data),
|
||||
[JobName.LIBRARY_MARK_ASSET_OFFLINE]: (data) => this.libraryService.handleOfflineAsset(data),
|
||||
[JobName.LIBRARY_SCAN]: (data) => this.libraryService.handleQueueAssetRefresh(data),
|
||||
[JobName.LIBRARY_DELETE]: (data) => this.libraryService.handleDeleteLibrary(data),
|
||||
[JobName.LIBRARY_REMOVE_OFFLINE]: (data) => this.libraryService.handleOfflineRemoval(data),
|
||||
[JobName.LIBRARY_QUEUE_SCAN_ALL]: (data) => this.libraryService.handleQueueAllScan(data),
|
||||
[JobName.LIBRARY_QUEUE_CLEANUP]: () => this.libraryService.handleQueueCleanup(),
|
||||
});
|
||||
|
||||
process.on('uncaughtException', (error: Error | any) => {
|
||||
|
||||
@@ -146,7 +146,6 @@ export class MetadataExtractionProcessor {
|
||||
|
||||
await this.applyMotionPhotos(asset, tags);
|
||||
await this.applyReverseGeocoding(asset, exifData);
|
||||
|
||||
await this.assetRepository.upsertExif(exifData);
|
||||
await this.assetRepository.save({
|
||||
id: asset.id,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { describe, expect, it } from '@jest/globals';
|
||||
import { parseLatitude, parseLongitude } from './coordinates';
|
||||
|
||||
describe('parsing latitude from string input', () => {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { describe, expect, it } from '@jest/globals';
|
||||
import { isDecimalNumber, isNumberInRange, toNumberOrNull } from './numbers';
|
||||
|
||||
describe('checks if a number is a decimal number', () => {
|
||||
|
||||
Reference in New Issue
Block a user