|
@@ -160,13 +160,15 @@ Future<void> _decorateEnteFileData(ente.File file, AssetEntity asset) async {
|
|
//In some devices, asset.latlngAsync() doesn't fetch the location data even
|
|
//In some devices, asset.latlngAsync() doesn't fetch the location data even
|
|
//if it is present. In such cases, extract location data from EXIF.
|
|
//if it is present. In such cases, extract location data from EXIF.
|
|
try {
|
|
try {
|
|
- final locationData = (await gpsDataFromExif(file)).toLocationObj();
|
|
|
|
|
|
+ final exif = await getExif(file);
|
|
|
|
+ final locationData = (await gpsDataFromExif(exif)).toLocationObj();
|
|
latLong = LatLng(
|
|
latLong = LatLng(
|
|
latitude: locationData?.latitude,
|
|
latitude: locationData?.latitude,
|
|
longitude: locationData?.longitude,
|
|
longitude: locationData?.longitude,
|
|
);
|
|
);
|
|
} catch (e, s) {
|
|
} catch (e, s) {
|
|
_logger.warning("Failed to get location from exif", e, s);
|
|
_logger.warning("Failed to get location from exif", e, s);
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
file.location =
|
|
file.location =
|