High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
fix(server): Object detection query and get server stats (#1823)
Alex9ebed3c1b421
diff --git a/mobile/openapi/README.md b/mobile/openapi/README.mdindex 5801f0d8b6..6aebfa3066 100644--- a/mobile/openapi/README.md+++ b/mobile/openapi/README.md@@ -3,7 +3,7 @@ Immich APIThis Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:-- API version: 1.47.3+- API version: 1.48.0- Build package: org.openapitools.codegen.languages.DartClientCodegen## Requirementsdiff --git a/server/apps/immich/src/api-v1/asset/asset-repository.ts b/server/apps/immich/src/api-v1/asset/asset-repository.tsindex 815264afb8..9f4ea7da49 100644--- a/server/apps/immich/src/api-v1/asset/asset-repository.ts+++ b/server/apps/immich/src/api-v1/asset/asset-repository.ts@@ -80,7 +80,7 @@ export class AssetRepository implements IAssetRepository {.createQueryBuilder('asset').leftJoinAndSelect('asset.smartInfo', 'si').where('asset.resizePath IS NOT NULL')- .andWhere('si.id IS NULL')+ .andWhere('si.assetId IS NULL').andWhere('asset.isVisible = true').getMany();}diff --git a/server/apps/immich/src/api-v1/server-info/server-info.service.ts b/server/apps/immich/src/api-v1/server-info/server-info.service.tsindex fbbe806da1..243d880dfe 100644--- a/server/apps/immich/src/api-v1/server-info/server-info.service.ts+++ b/server/apps/immich/src/api-v1/server-info/server-info.service.ts@@ -39,7 +39,7 @@ export class ServerInfoService {assetType: string;assetCount: string;totalSizeInBytes: string;- userId: string;+ ownerId: string;};const userStatsQueryResponse: UserStatsQueryResponse[] = await this.assetRepository@@ -56,9 +56,8 @@ export class ServerInfoService {const tmpMap = new Map<string, UsageByUserDto>();const getUsageByUser = (id: string) => tmpMap.get(id) || new UsageByUserDto(id);-userStatsQueryResponse.forEach((r) => {- const usageByUser = getUsageByUser(r.userId);+ const usageByUser = getUsageByUser(r.ownerId);usageByUser.photos += r.assetType === 'IMAGE' ? parseInt(r.assetCount) : 0;usageByUser.videos += r.assetType === 'VIDEO' ? parseInt(r.assetCount) : 0;usageByUser.usageRaw += parseInt(r.totalSizeInBytes);@@ -68,7 +67,7 @@ export class ServerInfoService {serverStats.videos += r.assetType === 'VIDEO' ? parseInt(r.assetCount) : 0;serverStats.usageRaw += parseInt(r.totalSizeInBytes);serverStats.usage = asHumanReadable(serverStats.usageRaw);- tmpMap.set(r.userId, usageByUser);+ tmpMap.set(r.ownerId, usageByUser);});serverStats.usageByUser = Array.from(tmpMap.values());diff --git a/web/src/api/open-api/api.ts b/web/src/api/open-api/api.tsindex ad6f206418..dba10a603e 100644--- a/web/src/api/open-api/api.ts+++ b/web/src/api/open-api/api.ts@@ -4,7 +4,7 @@* Immich* Immich API*- * The version of the OpenAPI document: 1.47.3+ * The version of the OpenAPI document: 1.48.0*** NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).diff --git a/web/src/api/open-api/base.ts b/web/src/api/open-api/base.tsindex 65aa2e2841..2cfb355b1e 100644--- a/web/src/api/open-api/base.ts+++ b/web/src/api/open-api/base.ts@@ -4,7 +4,7 @@* Immich* Immich API*- * The version of the OpenAPI document: 1.47.3+ * The version of the OpenAPI document: 1.48.0*** NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).diff --git a/web/src/api/open-api/common.ts b/web/src/api/open-api/common.tsindex 8d73891c26..aa11231c0e 100644--- a/web/src/api/open-api/common.ts+++ b/web/src/api/open-api/common.ts@@ -4,7 +4,7 @@* Immich* Immich API*- * The version of the OpenAPI document: 1.47.3+ * The version of the OpenAPI document: 1.48.0*** NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).diff --git a/web/src/api/open-api/configuration.ts b/web/src/api/open-api/configuration.tsindex 376741d5b8..517da032bb 100644--- a/web/src/api/open-api/configuration.ts+++ b/web/src/api/open-api/configuration.ts@@ -4,7 +4,7 @@* Immich* Immich API*- * The version of the OpenAPI document: 1.47.3+ * The version of the OpenAPI document: 1.48.0*** NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).diff --git a/web/src/api/open-api/index.ts b/web/src/api/open-api/index.tsindex c05c360ea8..04666208cb 100644--- a/web/src/api/open-api/index.ts+++ b/web/src/api/open-api/index.ts@@ -4,7 +4,7 @@* Immich* Immich API*- * The version of the OpenAPI document: 1.47.3+ * The version of the OpenAPI document: 1.48.0*** NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).