From 57d5d2a183d65c5b0744ba77f871ee51e2cde18a Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Thu, 18 Apr 2019 06:58:35 +0200 Subject: [PATCH] OpenStreetmap: PlaceID now uint instead of string API seems to have changed. --- internal/photoprism/openstreetmap.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/photoprism/openstreetmap.go b/internal/photoprism/openstreetmap.go index 9d450c97b..0254f46b0 100644 --- a/internal/photoprism/openstreetmap.go +++ b/internal/photoprism/openstreetmap.go @@ -25,7 +25,7 @@ type openstreetmapAddress struct { } type openstreetmapLocation struct { - PlaceID string `json:"place_id"` + PlaceID uint `json:"place_id"` Lat string `json:"lat"` Lon string `json:"lon"` Name string `json:"name"` @@ -67,8 +67,8 @@ func (m *MediaFile) GetLocation() (*models.Location, error) { return nil, err } - if id, err := strconv.Atoi(openstreetmapLocation.PlaceID); err == nil && id > 0 { - location.ID = uint(id) + if id := openstreetmapLocation.PlaceID; id > 0 { + location.ID = id } else { return nil, errors.New("query returned no result") }