remove usage of CreateDate

This commit is contained in:
Tykayn 2023-09-15 09:20:36 +02:00 committed by tykayn
parent 16e4a8a4e8
commit 23f79d92df
1 changed files with 22 additions and 9 deletions

View File

@ -103,6 +103,10 @@ export default class finder {
log.info(' ... chercher la date de création : "' + structureForFile.freeText + '"')
log.debug('data', data)
let foundDate = this.findEarliestDateInExifData(data)
let gpsData = this.findGpsCoordinates(data)
if (gpsData) {
structureForFile.tags.push('has-gps')
}
log.info(' =>>>>>>> foundDate : ', foundDate)
if (foundDate) {
@ -486,6 +490,14 @@ export default class finder {
}
static findGpsCoordinates(exifData: any) {
let result = null;
if (exifData && exifData.GPSDateTime) {
result = exifData.GPSDateTime
}
return result
}
/**
* finds the earliest part in several exif date info
* @param exifData
@ -533,8 +545,9 @@ export default class finder {
moments.push(exifData.FileModificationDateTime)
}
if (exifData.CreateDate) {
log.debug(' finder - image créée le : CreateDate : ', exifData.CreateDate)
moments.push(exifData.CreateDate)
// donne des dates trop anciennes par rapport à la réalité
// log.debug(' finder - image créée le : CreateDate : ', exifData.CreateDate)
// moments.push(exifData.CreateDate)
}
moments = moments.map(d => {