diff --git a/internal/entity/photo_optimize.go b/internal/entity/photo_optimize.go index 767976694..2b478db3c 100644 --- a/internal/entity/photo_optimize.go +++ b/internal/entity/photo_optimize.go @@ -73,9 +73,7 @@ func (m *Photo) EstimatePlace() { log.Errorf("photo: %s (estimate place)", err.Error()) m.EstimateCountry() } else { - if days := recentPhoto.TakenAt.Sub(m.TakenAt) / (time.Hour * 24); days < -7 { - log.Debugf("photo: can't estimate position of %s, %d days time difference", m, -1*days) - } else if days > -7 { + if days := recentPhoto.TakenAt.Sub(m.TakenAt) / (time.Hour * 24); days < -7 || days > 7 { log.Debugf("photo: can't estimate position of %s, %d days time difference", m, days) } else if recentPhoto.HasPlace() { m.Place = recentPhoto.Place