diff --git a/api/scanner/exif/exif.go b/api/scanner/exif/exif.go index a0449c86..2aa2bdea 100644 --- a/api/scanner/exif/exif.go +++ b/api/scanner/exif/exif.go @@ -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 } diff --git a/ui/src/components/timelineGallery/TimelineGallery.js b/ui/src/components/timelineGallery/TimelineGallery.js index db6bff13..8f66f022 100644 --- a/ui/src/components/timelineGallery/TimelineGallery.js +++ b/ui/src/components/timelineGallery/TimelineGallery.js @@ -48,6 +48,7 @@ const GalleryWrapper = styled.div` margin: -12px; display: flex; flex-wrap: wrap; + overflow-x: hidden; ` const TimelineGallery = () => {