update created_at logic
This commit is contained in:
@@ -399,7 +399,9 @@ func populateAlbum(tx *db.DB, album *db.Album, trags tagcommon.Info, modTime tim
|
||||
album.TagYear = trags.Year()
|
||||
|
||||
album.ModifiedAt = modTime
|
||||
album.CreatedAt = modTime
|
||||
if album.CreatedAt.After(modTime) {
|
||||
album.CreatedAt = modTime // reset created at to match filesytem for new albums
|
||||
}
|
||||
|
||||
if err := tx.Save(&album).Error; err != nil {
|
||||
return fmt.Errorf("saving album: %w", err)
|
||||
|
||||
@@ -13,7 +13,7 @@ type Reader interface {
|
||||
|
||||
type Info interface {
|
||||
Title() string
|
||||
BrainzID() string
|
||||
BrainzID() string // musicbrainz recording ID
|
||||
Artist() string
|
||||
Artists() []string
|
||||
Album() string
|
||||
|
||||
Reference in New Issue
Block a user