Merge pull request #77 from a-jackson/description
add description when metadata is shared
This commit is contained in:
+2
-1
@@ -121,7 +121,8 @@ class Render {
|
|||||||
previewUrl: immich.photoUrl(share.key, asset.id, ImageSize.preview),
|
previewUrl: immich.photoUrl(share.key, asset.id, ImageSize.preview),
|
||||||
downloadUrl,
|
downloadUrl,
|
||||||
thumbnailUrl: baseUrl + immich.photoUrl(share.key, asset.id, ImageSize.thumbnail),
|
thumbnailUrl: baseUrl + immich.photoUrl(share.key, asset.id, ImageSize.thumbnail),
|
||||||
video
|
video,
|
||||||
|
description: asset?.exifInfo?.description ?? ''
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
res.render('gallery', {
|
res.render('gallery', {
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ export enum AssetType {
|
|||||||
video = 'VIDEO'
|
video = 'VIDEO'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ExifInfo {
|
||||||
|
description?: string;
|
||||||
|
}
|
||||||
|
|
||||||
export enum AlbumType {
|
export enum AlbumType {
|
||||||
album = 'ALBUM',
|
album = 'ALBUM',
|
||||||
individual = 'INDIVIDUAL'
|
individual = 'INDIVIDUAL'
|
||||||
@@ -18,6 +22,7 @@ export interface Asset {
|
|||||||
fileCreatedAt?: string; // May not exist - see https://github.com/alangrainger/immich-public-proxy/issues/61
|
fileCreatedAt?: string; // May not exist - see https://github.com/alangrainger/immich-public-proxy/issues/61
|
||||||
type: AssetType;
|
type: AssetType;
|
||||||
isTrashed: boolean;
|
isTrashed: boolean;
|
||||||
|
exifInfo?: ExifInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Album {
|
export interface Album {
|
||||||
|
|||||||
@@ -34,6 +34,9 @@
|
|||||||
items.slice(0, 50).forEach(item => {
|
items.slice(0, 50).forEach(item => {
|
||||||
if (item.video) { %>
|
if (item.video) { %>
|
||||||
<a data-video='<%- item.video %>'
|
<a data-video='<%- item.video %>'
|
||||||
|
<% if (item.description) { %>
|
||||||
|
data-sub-html='<p><%= item.description %></p>'
|
||||||
|
<% } %>
|
||||||
<% if (item.downloadUrl) { %>
|
<% if (item.downloadUrl) { %>
|
||||||
data-download-url="<%- item.downloadUrl %>"
|
data-download-url="<%- item.downloadUrl %>"
|
||||||
<% } %>
|
<% } %>
|
||||||
@@ -43,6 +46,9 @@
|
|||||||
</a>
|
</a>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
<a href="<%- item.previewUrl %>"
|
<a href="<%- item.previewUrl %>"
|
||||||
|
<% if (item.description) { %>
|
||||||
|
data-sub-html='<p><%= item.description %></p>'
|
||||||
|
<% } %>
|
||||||
<% if (item.downloadUrl) { %>
|
<% if (item.downloadUrl) { %>
|
||||||
data-download-url="<%- item.downloadUrl %>"
|
data-download-url="<%- item.downloadUrl %>"
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|||||||
Reference in New Issue
Block a user