Skip to content

FIXED and FOR YOUR REVIEW: I had trouble with set_file_geo_data #468

@anantkochhar

Description

@anantkochhar

I had issues because many of my photos(like older photos, mobile screenshots) did not have geo_data. So I made this change:

    latitude = 0
    longitude = 0
    altitude = 0
    try:
        exif_data = json.get('geoDataExif', {})
        longitude = _str_to_float(exif_data.get('longitude', 0))
        latitude = _str_to_float(exif_data.get('latitude', 0))
        altitude = _str_to_float(exif_data.get('altitude', 0))
        #longitude = _str_to_float(json['geoDataExif']['longitude'])
        #latitude = _str_to_float(json['geoDataExif']['latitude'])
        #altitude = _str_to_float(json['geoDataExif']['altitude'])
    except KeyError:
        pass  # Skip if geoDataExif is missing

in place of:

    longitude = _str_to_float(json['geoData']['longitude'])
    latitude = _str_to_float(json['geoData']['latitude'])
    altitude = _str_to_float(json['geoData']['altitude'])

Please consider adding it to the next release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions