fix find gps tag

This commit is contained in:
Tykayn 2024-04-30 19:36:45 +02:00 committed by tykayn
parent efbf2d4be7
commit 6e6e271d18

View File

@ -115,6 +115,8 @@ export default class finder {
let gpsData = this.findGpsCoordinates(data)
if (gpsData) {
structureForFile.tags.push('has-gps')
console.log('+++++++++++++++ has gps data', structureForFile.tags)
}
let isScreenshot = this.findScreenshot(structureForFile.fileNameOriginal)
@ -542,8 +544,11 @@ export default class finder {
static findGpsCoordinates(exifData: any) {
let result = null;
if (exifData && exifData.GPSDateTime) {
result = exifData.GPSDateTime
console.log('+++++++++++ findGpsCoordinates exifData', exifData)
if (exifData ) {
if( exifData.GPSDateTime || exifData.GPSLatitude || exifData.GPSLongitude){
result = true
}
}
return result
}