chore: upgrade to kysely 0.28.11 (#26744)

This commit is contained in:
Daniel Dietzler
2026-03-11 16:17:31 +01:00
committed by GitHub
parent 8764a1894b
commit 34ce68095d
50 changed files with 941 additions and 857 deletions
+11 -3
View File
@@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common';
import { SystemConfig } from 'src/config';
import { FACE_THUMBNAIL_SIZE, JOBS_ASSET_PAGINATION_SIZE } from 'src/constants';
import { ImagePathOptions, StorageCore, ThumbnailPathEntity } from 'src/cores/storage.core';
import { AssetFile, Exif } from 'src/database';
import { AssetFile } from 'src/database';
import { OnEvent, OnJob } from 'src/decorators';
import { AssetEditAction, CropParameters } from 'src/dtos/editing.dto';
import { SystemConfigFFmpegDto } from 'src/dtos/system-config.dto';
@@ -258,7 +258,7 @@ export class MediaService extends BaseService {
return extracted;
}
private async decodeImage(thumbSource: string | Buffer, exifInfo: Exif, targetSize?: number) {
private async decodeImage(thumbSource: string | Buffer, exifInfo: ThumbnailAsset['exifInfo'], targetSize?: number) {
const { image } = await this.getConfig({ withCache: true });
const colorspace = this.isSRGB(exifInfo) ? Colorspace.Srgb : image.colorspace;
const decodeOptions: DecodeToBufferOptions = {
@@ -754,7 +754,15 @@ export class MediaService extends BaseService {
return name !== VideoContainer.Mp4 && !ffmpegConfig.acceptedContainers.includes(name);
}
isSRGB({ colorspace, profileDescription, bitsPerSample }: Exif): boolean {
isSRGB({
colorspace,
profileDescription,
bitsPerSample,
}: {
colorspace: string | null;
profileDescription: string | null;
bitsPerSample: number | null;
}): boolean {
if (colorspace || profileDescription) {
return [colorspace, profileDescription].some((s) => s?.toLowerCase().includes('srgb'));
} else if (bitsPerSample) {