Self-hosted personal gallery application with online photo management and albums, supporting Live/Motion Photos, EXIF parsing, geolocation recognition, and an explore map.
TypeScript albumsexif-extractiongeocodinglive-photomotion-photophoto-galleryphoto-sharingwebgl-viewer
fix(exif): 提取 EXIF IPTC/XMP 关键词时进行去重
Timothy Yin0cb07feffe16
diff --git a/server/services/image/exif.ts b/server/services/image/exif.tsindex 7cf0b5d9..e854c9ee 100644--- a/server/services/image/exif.ts+++ b/server/services/image/exif.ts@@ -170,7 +170,11 @@ export const extractPhotoInfo = (const dirPath = path.dirname(s3key)if (exifData?.Subject || exifData?.Keywords) {- tags = [...(exifData.Subject || []), ...(exifData.Keywords || [])]+ tags = [+ ...new Set([...(exifData.Subject || []), ...(exifData.Keywords || [])]),+ ]+ .map((tag) => tag.trim())+ .filter((tag) => tag.length > 0)} else if (dirPath && dirPath !== '.' && dirPath !== '/') {let relativePath = dirPathrelativePath = dirPath.slice('/photos'.length)