diff --git a/README.md b/README.md
index 4bd177e..0d92507 100644
--- a/README.md
+++ b/README.md
@@ -2,9 +2,9 @@
-
+
-
+
diff --git a/app/package-lock.json b/app/package-lock.json
index d630d8f..4bf83f7 100644
--- a/app/package-lock.json
+++ b/app/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "immich-public-proxy",
- "version": "1.11.0",
+ "version": "1.11.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "immich-public-proxy",
- "version": "1.11.0",
+ "version": "1.11.1",
"license": "AGPL-3.0",
"dependencies": {
"archiver": "^7.0.1",
diff --git a/app/package.json b/app/package.json
index 467b3ee..381252f 100644
--- a/app/package.json
+++ b/app/package.json
@@ -1,6 +1,6 @@
{
"name": "immich-public-proxy",
- "version": "1.11.0",
+ "version": "1.11.1",
"scripts": {
"dev": "ts-node src/index.ts",
"build": "npx tsc",
diff --git a/app/public/web.js b/app/public/web.js
index d5a380d..54b9648 100644
--- a/app/public/web.js
+++ b/app/public/web.js
@@ -64,15 +64,7 @@ class LGallery {
this.items
.slice(this.index, this.index + PER_PAGE)
.forEach(item => {
- if (item.video) {
- this.element.insertAdjacentHTML('beforeend', `
-
`)
- } else {
- this.element.insertAdjacentHTML('beforeend', `
-
`)
- }
+ this.element.insertAdjacentHTML('beforeend', item)
})
this.index += PER_PAGE
this.lightGallery.refresh()
diff --git a/app/src/render.ts b/app/src/render.ts
index 07c3bea..5a0c113 100644
--- a/app/src/render.ts
+++ b/app/src/render.ts
@@ -117,13 +117,22 @@ class Render {
// Add a download link for the original-size image, if configured in config.json
downloadUrl = immich.photoUrl(share.key, asset.id, ImageSize.original)
}
- items.push({
- previewUrl: immich.photoUrl(share.key, asset.id, ImageSize.preview),
- downloadUrl,
- thumbnailUrl: baseUrl + immich.photoUrl(share.key, asset.id, ImageSize.thumbnail),
- video,
- description: getConfigOption('ipp.showMetadata.description', false) && typeof asset?.exifInfo?.description === 'string' ? asset.exifInfo.description : ''
- })
+
+ const thumbnailUrl = baseUrl + immich.photoUrl(share.key, asset.id, ImageSize.thumbnail)
+ const previewUrl = immich.photoUrl(share.key, asset.id, ImageSize.preview)
+ const description = getConfigOption('ipp.showMetadata.description', false) && typeof asset?.exifInfo?.description === 'string' ? asset.exifInfo.description.replace(/'/g, ''') : ''
+
+ // Create the full HTML element source to pass to the gallery view
+ const itemHtml = [
+ video ? `
`,
+ video ? '' : '',
+ ''
+ ].join('')
+
+ items.push(itemHtml)
}
res.render('gallery', {
items,
diff --git a/app/views/gallery.ejs b/app/views/gallery.ejs
index 087b96d..27da8ed 100644
--- a/app/views/gallery.ejs
+++ b/app/views/gallery.ejs
@@ -32,33 +32,8 @@
<%
// Load the first 50 thumbnails, then load more as the user scrolls. See web.js
items.slice(0, 50).forEach(item => {
- // Replace HTML entities for description text (if any)
- item.description = item.description.replace(/'/g, ''')
- if (item.video) { %>
-
- data-sub-html='<%= item.description %>
'
- <% } %>
- <% if (item.downloadUrl) { %>
- data-download-url="<%- item.downloadUrl %>"
- <% } %>
- >
-
-
-
- <% } else { %>
-
- data-sub-html='<%= item.description %>
'
- <% } %>
- <% if (item.downloadUrl) { %>
- data-download-url="<%- item.downloadUrl %>"
- <% } %>
- >
-
-
- <% }
- }) %>
+ %><%- item %>
+ <% }) %>