fix(server): thumbnail queueing (#26077)

* fix thumbnail queueing

* add bmp

* other isEdited column
This commit is contained in:
Mert
2026-02-10 10:04:03 -05:00
committed by GitHub
parent c3730c8eab
commit 7fa6f617f5
6 changed files with 107 additions and 94 deletions

View File

@@ -1,7 +1,7 @@
import { extname } from 'node:path';
import { AssetType } from 'src/enum';
const raw: Record<string, string[]> = {
const raw = {
'.3fr': ['image/3fr', 'image/x-hasselblad-3fr'],
'.ari': ['image/ari', 'image/x-arriflex-ari'],
'.arw': ['image/arw', 'image/x-sony-arw'],
@@ -41,6 +41,7 @@ const raw: Record<string, string[]> = {
**/
const webSupportedImage = {
'.avif': ['image/avif'],
'.bmp': ['image/bmp'],
'.gif': ['image/gif'],
'.jpeg': ['image/jpeg'],
'.jpg': ['image/jpeg'],
@@ -48,10 +49,8 @@ const webSupportedImage = {
'.webp': ['image/webp'],
};
const image: Record<string, string[]> = {
const webUnsupportedImage = {
...raw,
...webSupportedImage,
'.bmp': ['image/bmp'],
'.heic': ['image/heic'],
'.heif': ['image/heif'],
'.hif': ['image/hif'],
@@ -64,6 +63,11 @@ const image: Record<string, string[]> = {
'.tiff': ['image/tiff'],
};
const image: Record<string, string[]> = {
...webSupportedImage,
...webUnsupportedImage,
};
const possiblyAnimatedImageExtensions = new Set(['.avif', '.gif', '.heic', '.heif', '.jxl', '.png', '.webp']);
const possiblyAnimatedImage: Record<string, string[]> = Object.fromEntries(
Object.entries(image).filter(([key]) => possiblyAnimatedImageExtensions.has(key)),
@@ -120,6 +124,7 @@ export const mimeTypes = {
sidecar,
video,
raw,
webUnsupportedImage,
isAsset: (filename: string) => isType(filename, image) || isType(filename, video),
isImage: (filename: string) => isType(filename, image),