diff --git a/package.json b/package.json index f34327c..349ced8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "immich-public-proxy", - "version": "1.3.0", + "version": "1.3.1", "scripts": { "dev": "ts-node src/index.ts", "build": "npx tsc", diff --git a/src/render.ts b/src/render.ts index 9c63924..a557a18 100644 --- a/src/render.ts +++ b/src/render.ts @@ -49,9 +49,17 @@ class Render { } res.render('gallery', { items, - openItem + openItem, + title: this.title(share) }) } + + /** + * Attempt to get a title from the link description or the album title + */ + title (share: SharedLink) { + return share.description || share?.album?.albumName || '' + } } const render = new Render() diff --git a/src/types.ts b/src/types.ts index b384766..8270a73 100644 --- a/src/types.ts +++ b/src/types.ts @@ -14,9 +14,11 @@ export interface Asset { export interface SharedLink { key: string; type: string; + description?: string; assets: Asset[]; album?: { id: string; + albumName?: string; } expiresAt: string | null; } diff --git a/views/gallery.ejs b/views/gallery.ejs index 5f5daec..56db5c3 100644 --- a/views/gallery.ejs +++ b/views/gallery.ejs @@ -2,7 +2,7 @@
-