diff --git a/conf/configuration.go b/conf/configuration.go index 74c3cfc4c..8a5f74428 100644 --- a/conf/configuration.go +++ b/conf/configuration.go @@ -256,7 +256,7 @@ func init() { viper.SetDefault("defaulttheme", "Dark") viper.SetDefault("defaultlanguage", "") viper.SetDefault("defaultuivolume", consts.DefaultUIVolume) - viper.SetDefault("enablereplaygain", false) + viper.SetDefault("enablereplaygain", true) viper.SetDefault("enablecoveranimation", true) viper.SetDefault("gatrackingid", "") viper.SetDefault("enablelogredacting", true) diff --git a/scanner/mapping.go b/scanner/mapping.go index 812c95563..39a134fed 100644 --- a/scanner/mapping.go +++ b/scanner/mapping.go @@ -69,19 +69,16 @@ func (s mediaFileMapper) toMediaFile(md metadata.Tags) model.MediaFile { mf.MbzAlbumArtistID = md.MbzAlbumArtistID() mf.MbzAlbumType = md.MbzAlbumType() mf.MbzAlbumComment = md.MbzAlbumComment() + mf.RGAlbumGain = md.RGAlbumGain() + mf.RGAlbumPeak = md.RGAlbumPeak() + mf.RGTrackGain = md.RGTrackGain() + mf.RGTrackPeak = md.RGTrackPeak() mf.Comment = utils.SanitizeText(md.Comment()) mf.Lyrics = utils.SanitizeText(md.Lyrics()) mf.Bpm = md.Bpm() mf.CreatedAt = time.Now() mf.UpdatedAt = md.ModificationTime() - if conf.Server.EnableReplayGain { - mf.RGAlbumGain = md.RGAlbumGain() - mf.RGAlbumPeak = md.RGAlbumPeak() - mf.RGTrackGain = md.RGTrackGain() - mf.RGTrackPeak = md.RGTrackPeak() - } - return *mf }