refactor(server): decouple generated images from image formats (#8246)
* rename thumbnail config update target paths, fix tests rename to image settings replace legacy enum better typing update sql update api remove config option fix * update docs * update other thumbnail configs in migration * keep legacy enum for now * fix jumbled job names * fix jumbled job names in tests * rename thumbhash job * rename dto * fix tests * preserve order * remove unused import * keep old fields in dto, marked deprecated * update sql --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
@@ -83,7 +83,7 @@ export class AssetRepository implements IAssetRepository {
|
||||
`entity.ownerId IN (:...ownerIds)
|
||||
AND entity.isVisible = true
|
||||
AND entity.isArchived = false
|
||||
AND entity.resizePath IS NOT NULL
|
||||
AND entity.previewPath IS NOT NULL
|
||||
AND EXTRACT(DAY FROM entity.localDateTime AT TIME ZONE 'UTC') = :day
|
||||
AND EXTRACT(MONTH FROM entity.localDateTime AT TIME ZONE 'UTC') = :month`,
|
||||
{
|
||||
@@ -302,10 +302,10 @@ export class AssetRepository implements IAssetRepository {
|
||||
switch (property) {
|
||||
case WithoutProperty.THUMBNAIL: {
|
||||
where = [
|
||||
{ resizePath: IsNull(), isVisible: true },
|
||||
{ resizePath: '', isVisible: true },
|
||||
{ webpPath: IsNull(), isVisible: true },
|
||||
{ webpPath: '', isVisible: true },
|
||||
{ previewPath: IsNull(), isVisible: true },
|
||||
{ previewPath: '', isVisible: true },
|
||||
{ thumbnailPath: IsNull(), isVisible: true },
|
||||
{ thumbnailPath: '', isVisible: true },
|
||||
{ thumbhash: IsNull(), isVisible: true },
|
||||
];
|
||||
break;
|
||||
@@ -339,7 +339,7 @@ export class AssetRepository implements IAssetRepository {
|
||||
};
|
||||
where = {
|
||||
isVisible: true,
|
||||
resizePath: Not(IsNull()),
|
||||
previewPath: Not(IsNull()),
|
||||
smartSearch: {
|
||||
embedding: IsNull(),
|
||||
},
|
||||
@@ -352,7 +352,7 @@ export class AssetRepository implements IAssetRepository {
|
||||
smartInfo: true,
|
||||
};
|
||||
where = {
|
||||
resizePath: Not(IsNull()),
|
||||
previewPath: Not(IsNull()),
|
||||
isVisible: true,
|
||||
smartInfo: {
|
||||
tags: IsNull(),
|
||||
@@ -367,7 +367,7 @@ export class AssetRepository implements IAssetRepository {
|
||||
jobStatus: true,
|
||||
};
|
||||
where = {
|
||||
resizePath: Not(IsNull()),
|
||||
previewPath: Not(IsNull()),
|
||||
isVisible: true,
|
||||
faces: {
|
||||
assetId: IsNull(),
|
||||
@@ -385,7 +385,7 @@ export class AssetRepository implements IAssetRepository {
|
||||
faces: true,
|
||||
};
|
||||
where = {
|
||||
resizePath: Not(IsNull()),
|
||||
previewPath: Not(IsNull()),
|
||||
isVisible: true,
|
||||
faces: {
|
||||
assetId: Not(IsNull()),
|
||||
|
||||
Reference in New Issue
Block a user