mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
* fix(server): Does not assign lat/lon if they are at 0,0 #2991 * Adds migration file to fix null island rows * Removed down migration * Leave empty down function
This commit is contained in:
parent
079aa13edb
commit
f1b8a7ab54
4 changed files with 44 additions and 4 deletions
|
|
@ -308,8 +308,16 @@ export class MetadataExtractionProcessor {
|
|||
|
||||
const latitude = getExifProperty('GPSLatitude');
|
||||
const longitude = getExifProperty('GPSLongitude');
|
||||
newExif.latitude = latitude !== null ? parseLatitude(latitude) : null;
|
||||
newExif.longitude = longitude !== null ? parseLongitude(longitude) : null;
|
||||
const lat = parseLatitude(latitude);
|
||||
const lon = parseLongitude(longitude);
|
||||
|
||||
if (lat === 0 && lon === 0) {
|
||||
this.logger.warn(`Latitude & Longitude were on Null Island (${lat},${lon}), not assigning coordinates`);
|
||||
} else {
|
||||
newExif.latitude = lat;
|
||||
newExif.longitude = lon;
|
||||
}
|
||||
|
||||
if (getExifProperty('MotionPhoto')) {
|
||||
// Seen on more recent Pixel phones: starting as early as Pixel 4a, possibly earlier.
|
||||
const rawDirectory = getExifProperty('Directory');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue