Metadata: Set time zone based on pictures taken at a similar time #914
This commit is contained in:
parent
9dad595c3e
commit
019a649c61
1 changed files with 12 additions and 0 deletions
|
@ -77,10 +77,22 @@ func (m *Photo) EstimatePlace() {
|
|||
m.PlaceID = recentPhoto.PlaceID
|
||||
m.PhotoCountry = recentPhoto.PhotoCountry
|
||||
m.PlaceSrc = SrcEstimate
|
||||
|
||||
if m.TakenSrc != SrcManual {
|
||||
m.TimeZone = recentPhoto.TimeZone
|
||||
m.TakenAt = m.GetTakenAt()
|
||||
}
|
||||
|
||||
log.Debugf("photo: approximate position of %s is %s (id %s)", m, txt.Quote(m.CountryName()), recentPhoto.PlaceID)
|
||||
} else if recentPhoto.HasCountry() {
|
||||
m.PhotoCountry = recentPhoto.PhotoCountry
|
||||
m.PlaceSrc = SrcEstimate
|
||||
|
||||
if m.TakenSrc != SrcManual {
|
||||
m.TimeZone = recentPhoto.TimeZone
|
||||
m.TakenAt = m.GetTakenAt()
|
||||
}
|
||||
|
||||
log.Debugf("photo: probable country for %s is %s", m, txt.Quote(m.CountryName()))
|
||||
} else {
|
||||
m.EstimateCountry()
|
||||
|
|
Loading…
Reference in a new issue