From a0985bebe69d0f24cbea070bb028cea3c2e2423b Mon Sep 17 00:00:00 2001 From: Braun Patrik Date: Tue, 18 Jul 2017 23:27:14 +0200 Subject: [PATCH] fixing test error --- backend/model/threading/DiskMangerWorker.ts | 5 ++--- common/entities/PhotoDTO.ts | 2 +- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/backend/model/threading/DiskMangerWorker.ts b/backend/model/threading/DiskMangerWorker.ts index 3ae7fe41..12d550ec 100644 --- a/backend/model/threading/DiskMangerWorker.ts +++ b/backend/model/threading/DiskMangerWorker.ts @@ -1,11 +1,10 @@ -/// import {DirectoryDTO} from "../../../common/entities/DirectoryDTO"; import {CameraMetadata, GPSMetadata, ImageSize, PhotoDTO, PhotoMetadata} from "../../../common/entities/PhotoDTO"; import {Logger} from "../../Logger"; import * as fs from "fs"; import * as path from "path"; import {IptcParser} from "ts-node-iptc"; -import * as exif_parser from "exif-parser"; +import {ExifParserFactory} from "ts-exif-parser"; import {ProjectPath} from "../../ProjectPath"; import {Config} from "../../../common/config/private/Config"; @@ -51,7 +50,7 @@ export class DiskMangerWorker { } try { - const exif = exif_parser.create(data).parse(); + const exif = ExifParserFactory.create(data).parse(); metadata.cameraData = { ISO: exif.tags.ISO, model: exif.tags.Model, diff --git a/common/entities/PhotoDTO.ts b/common/entities/PhotoDTO.ts index 8c9883a2..70536c1c 100644 --- a/common/entities/PhotoDTO.ts +++ b/common/entities/PhotoDTO.ts @@ -43,6 +43,6 @@ export interface PositionMetaData { export interface GPSMetadata { latitude?: number; longitude?: number; - altitude?: string; + altitude?: number; } diff --git a/package.json b/package.json index 536ceb13..e7877d8e 100644 --- a/package.json +++ b/package.json @@ -29,12 +29,12 @@ "body-parser": "1.17.2", "cookie-session": "^2.0.0-beta.2", "ejs": "2.5.6", - "exif-parser": "^0.1.11", "express": "4.15.3", "flat-file-db": "1.0.0", "jimp": "0.2.28", "mysql": "2.13.0", "reflect-metadata": "0.1.10", + "ts-exif-parser": "^0.1.23", "ts-node-iptc": "^1.0.8", "typeconfig": "1.0.4", "typeorm": "0.0.11",