Make sure TakenAt and TakenAtLocal are always set

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer
2019-09-19 15:46:04 -07:00
parent 0f47c84138
commit b194090d6b

View File

@@ -165,8 +165,9 @@ func (i *Indexer) indexMediaFile(mediaFile *MediaFile) string {
photo.PhotoExposure = mediaFile.Exposure()
}
if photo.TakenAt.IsZero() && photo.TakenAtChanged == false {
if photo.TakenAt.IsZero() || photo.TakenAtLocal.IsZero() {
photo.TakenAt = mediaFile.DateCreated()
photo.TakenAtLocal = photo.TakenAt
}
if location, err := mediaFile.Location(); err == nil {