Fix #246 Metadata is not hidden when "Show metadata" is disabled
This commit is contained in:
@@ -81,11 +81,15 @@ export async function gallery (res: Response, share: SharedLink, openItem?: numb
|
||||
? asset.exifInfo.description
|
||||
: ''
|
||||
|
||||
let width = asset.exifInfo?.exifImageWidth
|
||||
let height = asset.exifInfo?.exifImageHeight
|
||||
const orientation = asset.exifInfo?.orientation
|
||||
if (orientation && ['5', '6', '7', '8'].includes(orientation) && width && height) {
|
||||
[width, height] = [height, width]
|
||||
let width = asset.width
|
||||
let height = asset.height
|
||||
if (!width || !height) {
|
||||
width = asset.exifInfo?.exifImageWidth
|
||||
height = asset.exifInfo?.exifImageHeight
|
||||
const orientation = asset.exifInfo?.orientation
|
||||
if (orientation && ['5', '6', '7', '8'].includes(orientation) && width && height) {
|
||||
[width, height] = [height, width]
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
@@ -51,6 +51,8 @@ export interface Asset {
|
||||
type: AssetType;
|
||||
isTrashed: boolean;
|
||||
exifInfo?: ExifInfo;
|
||||
width?: number;
|
||||
height?: number;
|
||||
// Base64-encoded thumbhash for tasteful blur placeholders during lazy-load
|
||||
thumbhash?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user