diff --git a/app/src/render.ts b/app/src/render.ts
index e080791..3c0b4b8 100644
--- a/app/src/render.ts
+++ b/app/src/render.ts
@@ -111,45 +111,45 @@ class Render {
// Use .map to generate an array of promises, then await them all to load in parallel.
const items = await Promise.all(share.assets.map(async (asset) => {
- let video, downloadUrl
- if (asset.type === AssetType.video) {
- // Populate the data-video property
- video = JSON.stringify({
- source: [
- {
- src: immich.videoUrl(share.key, asset.id),
- type: await immich.getVideoContentType(asset)
- }
- ],
- attributes: {
- playsinline: 'playsinline',
- controls: 'controls'
- }
- })
- }
- if (getConfigOption('ipp.downloadOriginalPhoto', true)) {
- // Add a download link for the original-size image, if configured in config.json
- downloadUrl = immich.photoUrl(share.key, asset.id, ImageSize.original)
- }
+ let video, downloadUrl
+ if (asset.type === AssetType.video) {
+ // Populate the data-video property
+ video = JSON.stringify({
+ source: [
+ {
+ src: immich.videoUrl(share.key, asset.id),
+ type: await immich.getVideoContentType(asset)
+ }
+ ],
+ attributes: {
+ playsinline: 'playsinline',
+ controls: 'controls'
+ }
+ })
+ }
+ if (getConfigOption('ipp.downloadOriginalPhoto', true)) {
+ // Add a download link for the original-size image, if configured in config.json
+ downloadUrl = immich.photoUrl(share.key, asset.id, ImageSize.original)
+ }
- const thumbnailUrl = immich.photoUrl(share.key, asset.id, ImageSize.thumbnail)
- const previewUrl = immich.photoUrl(share.key, asset.id, immich.getPreviewImageSize(asset))
- const description = getConfigOption('ipp.showMetadata.description', false) && typeof asset?.exifInfo?.description === 'string' ? asset.exifInfo.description.replace(/'/g, ''') : ''
+ const thumbnailUrl = immich.photoUrl(share.key, asset.id, ImageSize.thumbnail)
+ const previewUrl = immich.photoUrl(share.key, asset.id, immich.getPreviewImageSize(asset))
+ 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('')
+ // Create the full HTML element source to pass to the gallery view
+ const itemHtml = [
+ video ? `
`,
+ video ? '' : '',
+ ''
+ ].join('')
- return {
- html: itemHtml,
- thumbnailUrl
- };
+ return {
+ html: itemHtml,
+ thumbnailUrl
+ };
}));
res.render('gallery', {