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
1 changed files with 7 additions and 2 deletions

View File

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