fix find gps tag
This commit is contained in:
parent
efbf2d4be7
commit
6e6e271d18
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue