From 902977f165b75c07e0f2ae4f5c3c86ece6be979b Mon Sep 17 00:00:00 2001 From: waclaw66 Date: Wed, 10 Jan 2024 13:36:54 +0100 Subject: [PATCH] fix(server): exif gps decoding (#6138) --- server/package-lock.json | 80 +++++++++---------- server/package.json | 4 +- .../src/domain/metadata/metadata.service.ts | 2 +- 3 files changed, 43 insertions(+), 43 deletions(-) diff --git a/server/package-lock.json b/server/package-lock.json index 32fc061a32..786ce185e2 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -30,8 +30,8 @@ "class-transformer": "^0.5.1", "class-validator": "^0.14.0", "cookie-parser": "^1.4.6", - "exiftool-vendored": "~23.5.0", - "exiftool-vendored.pl": "12.70", + "exiftool-vendored": "~24.3.0", + "exiftool-vendored.pl": "12.72", "fluent-ffmpeg": "^2.1.2", "geo-tz": "^7.0.7", "glob": "^10.3.3", @@ -3078,9 +3078,9 @@ } }, "node_modules/@photostructure/tz-lookup": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@photostructure/tz-lookup/-/tz-lookup-8.0.0.tgz", - "integrity": "sha512-D5ggPEWSNGEKzKTx6+Gn0NZXHQ4ywgRd2p2h7i/tjEmkv/uJ9SzQd0o7v7FzEAt4bP3dxDoWm43aPfUs9qMOGg==" + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@photostructure/tz-lookup/-/tz-lookup-9.0.0.tgz", + "integrity": "sha512-gM3Xrs+XhD8ojDN0TgybuzSjsQb9UvF8j9DvR75E2zHlJQNiOztzILvfhVwadgA8JJbSMNzE+kYUnwP8aQnlXw==" }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", @@ -3517,9 +3517,9 @@ "dev": true }, "node_modules/@types/luxon": { - "version": "3.3.5", - "resolved": "https://registry.npmjs.org/@types/luxon/-/luxon-3.3.5.tgz", - "integrity": "sha512-1cyf6Ge/94zlaWIZA2ei1pE6SZ8xpad2hXaYa5JEFiaUH0YS494CZwyi4MXNpXD9oEuv6ZH0Bmh0e7F9sPhmZA==" + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/@types/luxon/-/luxon-3.3.7.tgz", + "integrity": "sha512-gKc9P2d4g5uYwmy4s/MO/yOVPmvHyvzka1YH6i5dM03UrFofHSmgc0D0ymbDRStFWHusk6cwwF6nhLm/ckBbbQ==" }, "node_modules/@types/methods": { "version": "1.1.4", @@ -6338,34 +6338,34 @@ "dev": true }, "node_modules/exiftool-vendored": { - "version": "23.5.0", - "resolved": "https://registry.npmjs.org/exiftool-vendored/-/exiftool-vendored-23.5.0.tgz", - "integrity": "sha512-6wlCNFFOcOcRa8GpuCzg0dhOcRMipONMZidP3jYUF0g7YkhknKxG4aA0BdmeH2Tp3Hm0286egicslGW9d7fZoA==", + "version": "24.3.0", + "resolved": "https://registry.npmjs.org/exiftool-vendored/-/exiftool-vendored-24.3.0.tgz", + "integrity": "sha512-gOo23NDvlbSSegUXnRmjPdU9mZzZMH5zEDYPTMNCMIqHrUJeDbSyr4xd6Y0hwv3int7I2RAIhS5VxQTqwQkrjg==", "dependencies": { - "@photostructure/tz-lookup": "^8.0.0", - "@types/luxon": "^3.3.5", + "@photostructure/tz-lookup": "^9.0.0", + "@types/luxon": "^3.3.7", "batch-cluster": "^12.1.0", "he": "^1.2.0", "luxon": "^3.4.4" }, "optionalDependencies": { - "exiftool-vendored.exe": "12.70.0", - "exiftool-vendored.pl": "12.70.0" + "exiftool-vendored.exe": "12.72.0", + "exiftool-vendored.pl": "12.72.0" } }, "node_modules/exiftool-vendored.exe": { - "version": "12.70.0", - "resolved": "https://registry.npmjs.org/exiftool-vendored.exe/-/exiftool-vendored.exe-12.70.0.tgz", - "integrity": "sha512-Jp78fvWCls2q3+6P0GxEpgBEgIj2MJsrOKxfAnVzADO3BZ8jRTdYCHVMUoxbiuzIcqzLmQA2mPLjhQ35Y4MyeA==", + "version": "12.72.0", + "resolved": "https://registry.npmjs.org/exiftool-vendored.exe/-/exiftool-vendored.exe-12.72.0.tgz", + "integrity": "sha512-hGULL4BEDruu0PaoaAUgHxL9ZyGMPmYZNup95b75qwUbkG69SIM0yFPaL7oA9SMgN3fjTxhzGVmoTZ57nwpVlg==", "optional": true, "os": [ "win32" ] }, "node_modules/exiftool-vendored.pl": { - "version": "12.70.0", - "resolved": "https://registry.npmjs.org/exiftool-vendored.pl/-/exiftool-vendored.pl-12.70.0.tgz", - "integrity": "sha512-nozVKVE7Leq2lQ+Kd6VbX+S04z0TKYGd42F1odwEl8AtWNlJViZ7rsi+OLHkJ0llWmObotviYAsj/xhF28qPSQ==", + "version": "12.72.0", + "resolved": "https://registry.npmjs.org/exiftool-vendored.pl/-/exiftool-vendored.pl-12.72.0.tgz", + "integrity": "sha512-8ThVehO5G0OwhfJtdE6Q1D0FlQ58XhzHHPwVAxg2JOUL+mOyJQoI1dDVRM0IDZcCONuz8+k2bEDZht40xkU2xg==", "os": [ "!win32" ] @@ -14739,9 +14739,9 @@ } }, "@photostructure/tz-lookup": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@photostructure/tz-lookup/-/tz-lookup-8.0.0.tgz", - "integrity": "sha512-D5ggPEWSNGEKzKTx6+Gn0NZXHQ4ywgRd2p2h7i/tjEmkv/uJ9SzQd0o7v7FzEAt4bP3dxDoWm43aPfUs9qMOGg==" + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@photostructure/tz-lookup/-/tz-lookup-9.0.0.tgz", + "integrity": "sha512-gM3Xrs+XhD8ojDN0TgybuzSjsQb9UvF8j9DvR75E2zHlJQNiOztzILvfhVwadgA8JJbSMNzE+kYUnwP8aQnlXw==" }, "@pkgjs/parseargs": { "version": "0.11.0", @@ -15154,9 +15154,9 @@ "dev": true }, "@types/luxon": { - "version": "3.3.5", - "resolved": "https://registry.npmjs.org/@types/luxon/-/luxon-3.3.5.tgz", - "integrity": "sha512-1cyf6Ge/94zlaWIZA2ei1pE6SZ8xpad2hXaYa5JEFiaUH0YS494CZwyi4MXNpXD9oEuv6ZH0Bmh0e7F9sPhmZA==" + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/@types/luxon/-/luxon-3.3.7.tgz", + "integrity": "sha512-gKc9P2d4g5uYwmy4s/MO/yOVPmvHyvzka1YH6i5dM03UrFofHSmgc0D0ymbDRStFWHusk6cwwF6nhLm/ckBbbQ==" }, "@types/methods": { "version": "1.1.4", @@ -17287,29 +17287,29 @@ } }, "exiftool-vendored": { - "version": "23.5.0", - "resolved": "https://registry.npmjs.org/exiftool-vendored/-/exiftool-vendored-23.5.0.tgz", - "integrity": "sha512-6wlCNFFOcOcRa8GpuCzg0dhOcRMipONMZidP3jYUF0g7YkhknKxG4aA0BdmeH2Tp3Hm0286egicslGW9d7fZoA==", + "version": "24.3.0", + "resolved": "https://registry.npmjs.org/exiftool-vendored/-/exiftool-vendored-24.3.0.tgz", + "integrity": "sha512-gOo23NDvlbSSegUXnRmjPdU9mZzZMH5zEDYPTMNCMIqHrUJeDbSyr4xd6Y0hwv3int7I2RAIhS5VxQTqwQkrjg==", "requires": { - "@photostructure/tz-lookup": "^8.0.0", - "@types/luxon": "^3.3.5", + "@photostructure/tz-lookup": "^9.0.0", + "@types/luxon": "^3.3.7", "batch-cluster": "^12.1.0", - "exiftool-vendored.exe": "12.70.0", - "exiftool-vendored.pl": "12.70.0", + "exiftool-vendored.exe": "12.72.0", + "exiftool-vendored.pl": "12.72.0", "he": "^1.2.0", "luxon": "^3.4.4" } }, "exiftool-vendored.exe": { - "version": "12.70.0", - "resolved": "https://registry.npmjs.org/exiftool-vendored.exe/-/exiftool-vendored.exe-12.70.0.tgz", - "integrity": "sha512-Jp78fvWCls2q3+6P0GxEpgBEgIj2MJsrOKxfAnVzADO3BZ8jRTdYCHVMUoxbiuzIcqzLmQA2mPLjhQ35Y4MyeA==", + "version": "12.72.0", + "resolved": "https://registry.npmjs.org/exiftool-vendored.exe/-/exiftool-vendored.exe-12.72.0.tgz", + "integrity": "sha512-hGULL4BEDruu0PaoaAUgHxL9ZyGMPmYZNup95b75qwUbkG69SIM0yFPaL7oA9SMgN3fjTxhzGVmoTZ57nwpVlg==", "optional": true }, "exiftool-vendored.pl": { - "version": "12.70.0", - "resolved": "https://registry.npmjs.org/exiftool-vendored.pl/-/exiftool-vendored.pl-12.70.0.tgz", - "integrity": "sha512-nozVKVE7Leq2lQ+Kd6VbX+S04z0TKYGd42F1odwEl8AtWNlJViZ7rsi+OLHkJ0llWmObotviYAsj/xhF28qPSQ==" + "version": "12.72.0", + "resolved": "https://registry.npmjs.org/exiftool-vendored.pl/-/exiftool-vendored.pl-12.72.0.tgz", + "integrity": "sha512-8ThVehO5G0OwhfJtdE6Q1D0FlQ58XhzHHPwVAxg2JOUL+mOyJQoI1dDVRM0IDZcCONuz8+k2bEDZht40xkU2xg==" }, "exit": { "version": "0.1.2", diff --git a/server/package.json b/server/package.json index 272c31144d..3306760520 100644 --- a/server/package.json +++ b/server/package.json @@ -58,8 +58,8 @@ "class-transformer": "^0.5.1", "class-validator": "^0.14.0", "cookie-parser": "^1.4.6", - "exiftool-vendored": "~23.5.0", - "exiftool-vendored.pl": "12.70", + "exiftool-vendored": "~24.3.0", + "exiftool-vendored.pl": "12.72", "fluent-ffmpeg": "^2.1.2", "geo-tz": "^7.0.7", "glob": "^10.3.3", diff --git a/server/src/domain/metadata/metadata.service.ts b/server/src/domain/metadata/metadata.service.ts index 111b201ac1..a00c504768 100644 --- a/server/src/domain/metadata/metadata.service.ts +++ b/server/src/domain/metadata/metadata.service.ts @@ -457,7 +457,7 @@ export class MetadataService { fileSizeInByte: stats.size, fNumber: validate(tags.FNumber), focalLength: validate(tags.FocalLength), - fps: validate(tags.VideoFrameRate), + fps: validate(parseFloat(tags.VideoFrameRate!)), iso: validate(tags.ISO), latitude: validate(tags.GPSLatitude), lensModel: tags.LensModel ?? null,