Indexer: Update picture dates derived from file names

This commit is contained in:
Michael Mayer 2020-12-16 12:50:53 +01:00
parent c4b42d7e61
commit a5b9bc695e

View file

@ -631,12 +631,13 @@ func (ind *Index) MediaFile(m *MediaFile, o IndexOptions, originalName string) (
photo.PhotoExposure = m.Exposure()
}
if photo.TakenSrc == entity.SrcAuto {
if photo.TakenSrc == entity.SrcAuto || photo.TakenSrc == entity.SrcName {
takenUtc, takenSrc := m.TakenAt()
photo.SetTakenAt(takenUtc, takenUtc, "", takenSrc)
}
var locLabels classify.Labels
locKeywords, locLabels = photo.UpdateLocation()
labels = append(labels, locLabels...)
}