Backend: Limit place estimates to 36h time difference
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
parent
91a1a1ca27
commit
28595497b1
1 changed files with 2 additions and 2 deletions
|
@ -73,8 +73,8 @@ 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 < -3 || days > 3 {
|
||||
log.Debugf("photo: can't estimate position of %s, %d days time difference", m, days)
|
||||
if hours := recentPhoto.TakenAt.Sub(m.TakenAt) / time.Hour; hours < -36 || hours > 36 {
|
||||
log.Debugf("photo: can't estimate position of %s, %d hours time difference", m, hours)
|
||||
} else if recentPhoto.HasPlace() {
|
||||
m.Place = recentPhoto.Place
|
||||
m.PlaceID = recentPhoto.PlaceID
|
||||
|
|
Loading…
Reference in a new issue