High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
fix(server): use GPSLongitudeRef and GPSLatitudeRef EXIF fields (#21445)
Rui Gonçalvesdbd6dcb78631
diff --git a/e2e/package.json b/e2e/package.jsonindex 80762a3874..56d982682d 100644--- a/e2e/package.json+++ b/e2e/package.json@@ -34,7 +34,7 @@"eslint-config-prettier": "^10.1.8","eslint-plugin-prettier": "^5.1.3","eslint-plugin-unicorn": "^60.0.0",- "exiftool-vendored": "^28.3.1",+ "exiftool-vendored": "^31.1.0","globals": "^16.0.0","jose": "^5.6.3","luxon": "^3.4.4",diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 843db95a77..be6b2974b0 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -238,8 +238,8 @@ importers:specifier: ^60.0.0version: 60.0.0([email protected]([email protected]))exiftool-vendored:- specifier: ^28.3.1- version: 28.8.0+ specifier: ^31.1.0+ version: 31.1.0globals:specifier: ^16.0.0version: 16.4.0@@ -404,8 +404,8 @@ importers:specifier: 4.3.3version: 4.3.3exiftool-vendored:- specifier: ^28.8.0- version: 28.8.0+ specifier: ^31.1.0+ version: 31.1.0express:specifier: ^5.1.0version: 5.1.0@@ -3495,8 +3495,8 @@ packages:peerDependencies:'@photo-sphere-viewer/core': 5.14.0- '@photostructure/[email protected]':- resolution: {integrity: sha512-DwrvodcXHNSdGdeSF7SBL5o8aBlsaeuCuG7633F04nYsL3hn5Hxe3z/5kCqxv61J1q7ggKZ27GPylR3x0cPNXQ==}+ '@photostructure/[email protected]':+ resolution: {integrity: sha512-ugPtvpdLwGQ8IWezSGFgUCYOpO/XXetfKLNv+UN2jjTYyfIDq9dA21GydGyzXuoQ06nN3VGBd3JxmEu+ZtXScg==}'@pkgjs/[email protected]':resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==}@@ -5210,9 +5210,9 @@ packages:resolution: {integrity: sha512-qsJ8/X+UypqxHXN75M7dF88jNK37dLBRW7LeUzCPz+TNs37G8cfWy9nWzS+LS//g600zrt2le9KuXt0rWfDz5Q==}hasBin: true- resolution: {integrity: sha512-EreW0Vi8TwovhYUHBXXRA5tthuU2ynGsZFlboyMJHCCUXYa2AjgwnE3ubBOJs2xJLcuXFJbi6c/8pH5+FVj8Og==}- engines: {node: '>=14'}+ resolution: {integrity: sha512-eUmh0ld1AUPKTEmdzwGF9QTSexXAyt9rA1F5zDfW1wUi3okA3Tal4NLdCeFI6aiKpBenQhR6NmK9bW9tBHTGPQ==}+ engines: {node: '>=20'}resolution: {integrity: sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==}@@ -6547,16 +6547,18 @@ packages:resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==}engines: {node: '>=10'}- resolution: {integrity: sha512-4zAMuFGgxZkOoyQIzZMHv1HlvgyJK3AkNqjAgm8A8V0UmOZO7yv3pH49cDV1OduzFJqgs6yQ6eG4OGydhKtxlg==}+ resolution: {integrity: sha512-oZx5enTAvSiIAXL+OEk7nNWrfUhEdKUpaGwDjCmz4VKwOa4HbisqyM808xPGPYj8X7XikcME/fq5hvevPeE3cw==}os: [win32]- resolution: {integrity: sha512-+BRRzjselpWudKR0ltAW5SUt9T82D+gzQN8DdOQUgnSVWWp7oLCeTGBRptbQz+436Ihn/mPzmo/xnf0cv/Qw1A==}+ resolution: {integrity: sha512-Q3xl1nnwswrsR5344z4NyqvI74fKwla+VJHY1N+32gcDgt8cs9KBsDUwcNzKHSOSa/MjEfniuCJVrQiqR05iag==}os: ['!win32']+ hasBin: true- resolution: {integrity: sha512-R7tirJLr9fWuH9JS/KFFLB+O7jNGKuPXGxREc6YybYangEudGb+X8ERsYXk9AifMiAWh/2agNfbgkbcQcF+MxA==}+ resolution: {integrity: sha512-q8StxLawHLDvhqv/uoBYCfVbDskn49Cr5ouNCZhh4lgryGu1aymHwK9AvO6RcW2SbPm5MSnQDJOfGp2MW5Nnrw==}+ engines: {node: '>=20.0.0'}resolution: {integrity: sha512-/kP8CAwxzLVEeFrMm4kMmy4CCDlpipyA7MYLVrdJIkV0fYF0UaigQHRsxHiuY/GEea+bh4KSv3TIlgr+2UL6bw==}@@ -15128,7 +15130,7 @@ snapshots:'@photo-sphere-viewer/core': 5.14.0three: 0.180.0- '@photostructure/[email protected]': {}+ '@photostructure/[email protected]': {}'@pkgjs/[email protected]':optional: true@@ -17069,7 +17071,7 @@ snapshots:- [email protected]: {}+ [email protected]: {}@@ -18608,21 +18610,21 @@ snapshots:signal-exit: 3.0.7strip-final-newline: 2.0.0optional: true- [email protected]: {}+ [email protected]: {}dependencies:- '@photostructure/tz-lookup': 11.2.0+ '@photostructure/tz-lookup': 11.2.1'@types/luxon': 3.7.1- batch-cluster: 13.0.0- exiftool-vendored.pl: 13.0.1+ batch-cluster: 15.0.1+ exiftool-vendored.pl: 13.38.0he: 1.2.0luxon: 3.7.2optionalDependencies:- exiftool-vendored.exe: 13.0.0+ exiftool-vendored.exe: 13.38.0diff --git a/server/package.json b/server/package.jsonindex 477f25fa2f..a7927e5ac6 100644--- a/server/package.json+++ b/server/package.json@@ -68,7 +68,7 @@"cookie": "^1.0.2","cookie-parser": "^1.4.7","cron": "4.3.3",- "exiftool-vendored": "^28.8.0",+ "exiftool-vendored": "^31.1.0","express": "^5.1.0","fast-glob": "^3.3.2","fluent-ffmpeg": "^2.1.2",diff --git a/server/src/repositories/metadata.repository.ts b/server/src/repositories/metadata.repository.tsindex e2360156e4..6073ddcb22 100644--- a/server/src/repositories/metadata.repository.ts+++ b/server/src/repositories/metadata.repository.ts@@ -84,6 +84,7 @@ export class MetadataRepository {numericTags: [...DefaultReadTaskOptions.numericTags, 'FocalLength', 'FileSize'],/* eslint unicorn/no-array-callback-reference: off, unicorn/no-array-method-this-argument: off */geoTz: (lat, lon) => geotz.find(lat, lon)[0],+ geolocation: true,// Enable exiftool LFS to parse metadata for files larger than 2GB.readArgs: ['-api', 'largefilesupport=1'],writeArgs: ['-api', 'largefilesupport=1', '-overwrite_original'],diff --git a/server/src/services/metadata.service.ts b/server/src/services/metadata.service.tsindex 7d3de76550..b73a9b6bf0 100644--- a/server/src/services/metadata.service.ts+++ b/server/src/services/metadata.service.ts@@ -447,7 +447,10 @@ export class MetadataService extends BaseService {* For RAW images in the CR2 or RAF format, the "ImageSize" value seems to be correct,* but ImageWidth and ImageHeight are not correct (they contain the dimensions of the preview image).*/- let [width, height] = exifTags.ImageSize?.split('x').map((dim) => Number.parseInt(dim) || undefined) || [];+ let [width, height] =+ exifTags.ImageSize?.toString()+ ?.split('x')+ ?.map((dim) => Number.parseInt(dim) || undefined) ?? [];if (!width || !height) {[width, height] = [exifTags.ImageWidth, exifTags.ImageHeight];}