Skip to content

Commit

Permalink
Update media date_shot to match exif
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorstrate committed Feb 13, 2021
1 parent 35b41e1 commit 2ba8e46
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions api/scanner/exif/exif.go
Expand Up @@ -47,5 +47,12 @@ func SaveEXIF(tx *gorm.DB, media *models.Media) (*models.MediaEXIF, error) {
return nil, errors.Wrap(err, "save media exif to database")
}

if !exif.DateShot.Equal(media.DateShot) {
media.DateShot = *exif.DateShot
if err := tx.Save(media).Error; err != nil {
return nil, errors.Wrap(err, "update media date_shot")
}
}

return exif, nil
}
1 change: 1 addition & 0 deletions ui/src/components/timelineGallery/TimelineGallery.js
Expand Up @@ -48,6 +48,7 @@ const GalleryWrapper = styled.div`
margin: -12px;
display: flex;
flex-wrap: wrap;
overflow-x: hidden;
`

const TimelineGallery = () => {
Expand Down

0 comments on commit 2ba8e46

Please sign in to comment.