From 992f12fc1944762d6d2123ff0c23b31ed053710c Mon Sep 17 00:00:00 2001 From: Varun Raj Date: Sat, 31 Aug 2024 17:14:34 +0530 Subject: [PATCH 1/3] fix: removed thubmnail and preview paths Signed-off-by: Varun Raj --- src/pages/api/albums/potential-albums-assets.ts | 3 --- src/pages/api/assets/missing-location-assets.ts | 3 --- src/pages/api/people/[id]/similar-faces.ts | 1 - src/pages/api/people/list.ts | 1 - src/schema/assets.schema.ts | 2 -- src/types/asset.d.ts | 2 -- 6 files changed, 12 deletions(-) diff --git a/src/pages/api/albums/potential-albums-assets.ts b/src/pages/api/albums/potential-albums-assets.ts index 4ab957f..e17c7ba 100644 --- a/src/pages/api/albums/potential-albums-assets.ts +++ b/src/pages/api/albums/potential-albums-assets.ts @@ -14,10 +14,8 @@ const SELECT_ORPHAN_PHOTOS = (date: string, ownerId: string) => a."deviceId", a."type", a."originalPath", - a."previewPath", a."isFavorite", a."duration", - a."thumbnailPath", a."encodedVideoPath", a."originalFileName", a."sidecarPath", @@ -38,7 +36,6 @@ const SELECT_ORPHAN_PHOTOS = (date: string, ownerId: string) => aaa."albumsId" IS NULL AND a."ownerId" = '${ownerId}' AND a."localDateTime"::date = '${date}' - AND a."previewPath" IS NOT NULL `); export default async function handler( diff --git a/src/pages/api/assets/missing-location-assets.ts b/src/pages/api/assets/missing-location-assets.ts index 1594cf4..bdb7cba 100644 --- a/src/pages/api/assets/missing-location-assets.ts +++ b/src/pages/api/assets/missing-location-assets.ts @@ -33,10 +33,8 @@ export default async function handler( deviceId: assets.deviceId, type: assets.type, originalPath: assets.originalPath, - previewPath: assets.previewPath, isFavorite: assets.isFavorite, duration: assets.duration, - thumbnailPath: assets.thumbnailPath, encodedVideoPath: assets.encodedVideoPath, originalFileName: assets.originalFileName, sidecarPath: assets.sidecarPath, @@ -55,7 +53,6 @@ export default async function handler( lte(exif.dateTimeOriginal, endDateDate), eq(assets.type, "VIDEO"), eq(assets.ownerId, currentUser.id), - isNotNull(assets.previewPath), )); return res.status(200).json(rows); diff --git a/src/pages/api/people/[id]/similar-faces.ts b/src/pages/api/people/[id]/similar-faces.ts index ff3e679..0a0729f 100644 --- a/src/pages/api/people/[id]/similar-faces.ts +++ b/src/pages/api/people/[id]/similar-faces.ts @@ -83,7 +83,6 @@ export default async function handler( .selectDistinctOn([person.id], { id: person.id, name: person.name, - thumbnailPath: person.thumbnailPath, birthDate: person.birthDate, isHidden: person.isHidden, updatedAt: person.updatedAt, diff --git a/src/pages/api/people/list.ts b/src/pages/api/people/list.ts index d21b504..340a7ef 100644 --- a/src/pages/api/people/list.ts +++ b/src/pages/api/people/list.ts @@ -60,7 +60,6 @@ export default async function handler( .select({ id: person.id, name: person.name, - thumbnailPath: person.thumbnailPath, birthDate: person.birthDate, isHidden: person.isHidden, updatedAt: person.updatedAt, diff --git a/src/schema/assets.schema.ts b/src/schema/assets.schema.ts index 908e35a..a436300 100644 --- a/src/schema/assets.schema.ts +++ b/src/schema/assets.schema.ts @@ -7,12 +7,10 @@ export const assets = pgTable('assets', { deviceId: varchar('deviceId').notNull(), type: varchar('type').notNull(), originalPath: varchar('originalPath').notNull(), - previewPath: varchar('previewPath'), fileCreatedAt: timestamp('fileCreatedAt', { withTimezone: true }).notNull(), fileModifiedAt: timestamp('fileModifiedAt', { withTimezone: true }).notNull(), isFavorite: boolean('isFavorite').default(false).notNull(), duration: varchar('duration'), - thumbnailPath: varchar('thumbnailPath').default(''), encodedVideoPath: varchar('encodedVideoPath').default(''), // checksum: bytea('checksum').notNull(), isVisible: boolean('isVisible').default(true).notNull(), diff --git a/src/types/asset.d.ts b/src/types/asset.d.ts index 1466a50..25e1491 100644 --- a/src/types/asset.d.ts +++ b/src/types/asset.d.ts @@ -4,10 +4,8 @@ export interface IAsset { deviceId: string; type: string; originalPath: string; - previewPath: string; isFavorite: boolean; duration: null; - thumbnailPath: string; encodedVideoPath: string; originalFileName: string; sidecarPath: null; From 7ef2ce5af940536e16b2a50001cd6c5462c2f126 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sat, 31 Aug 2024 11:50:56 +0000 Subject: [PATCH 2/3] chore(release): 0.3.1 [skip ci] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 🚀 **Immich Power Tools** 0.3.1 ### Bug Fixes * removed thubmnail and preview paths ([992f12f](https://github.com/varun-raj/immich-power-tools/commit/992f12fc1944762d6d2123ff0c23b31ed053710c)) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 81dac4b..e3d4190 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "immich-power-tools", - "version": "0.3.0", + "version": "0.3.1", "private": true, "scripts": { "dev": "next dev", From 33e42360b9e4dcda00aaf8c5de1ec42ddaf1a9f5 Mon Sep 17 00:00:00 2001 From: sai80082 Date: Sun, 1 Sep 2024 19:08:38 +0530 Subject: [PATCH 3/3] chore: Updated readme for immich url --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index df796f1..4f52b8d 100644 --- a/README.md +++ b/README.md @@ -33,10 +33,12 @@ services: - .env ``` -Add the Immich API Key to the env file (which you already have for the immich) +Add the Immich API Key and immich url's to the env file (which you already have for the immich) ```bash IMMICH_API_KEY= # your_immich_api_key +IMMICH_URL = "http://local-ip-of-immich:port" # Your immich instace ip address and port +EXTERNAL_IMMICH_URL = "https://external-address" # External address of immich ``` Refer here for obtaining Immich API Key: https://immich.app/docs/features/command-line-interface#obtain-the-api-key #### Method 2 - Portainer