Fix time difference threshold in Photo.EstimatePlace()
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
parent
6273e77867
commit
3bfbd3070e
1 changed files with 1 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue