exiftool-vendored
Advanced tools
Comparing version 22.2.0 to 22.2.1
@@ -29,2 +29,6 @@ # Changelog/Versioning | ||
### v22.2.1 | ||
- 🐞 `ExifTime` now properly rejects invalid `SubSecTime`, `SubSecTimeOriginal`, ... values of "0" or "00". | ||
### v22.2.0 | ||
@@ -31,0 +35,0 @@ |
@@ -7,2 +7,6 @@ "use strict"; | ||
const String_1 = require("./String"); | ||
// Reject times whose raw value is "0" or "00". TODO: We may want to reject | ||
// "00:00", but midnight is a valid time--we'd have to reject 00:00 only if we | ||
// could be certain this photo wasn't taken exactly at midnight. | ||
const onlyZerosRE = /^0+$/; | ||
/** | ||
@@ -13,5 +17,5 @@ * Encodes an ExifTime (which may not have a timezone offset) | ||
static fromEXIF(text) { | ||
if ((0, String_1.blank)(text)) | ||
text = (0, String_1.toS)(text).trim(); | ||
if ((0, String_1.blank)(text) || onlyZerosRE.test(text)) | ||
return; | ||
text = (0, String_1.toS)(text).trim(); | ||
return (0, Maybe_1.first)(["HH:mm:ss.uZZ", "HH:mm:ssZZ", "HH:mm:ss.u", "HH:mm:ss"], (fmt) => (0, Maybe_1.map)(luxon_1.DateTime.fromFormat(text, fmt), (dt) => this.fromDateTime(dt, text))); | ||
@@ -18,0 +22,0 @@ } |
{ | ||
"name": "exiftool-vendored", | ||
"version": "22.2.0", | ||
"version": "22.2.1", | ||
"description": "Efficient, cross-platform access to ExifTool", | ||
@@ -5,0 +5,0 @@ "main": "./dist/ExifTool.js", |
Sorry, the diff of this file is not supported yet
488069
8403