Enable ReplayGain by default and always import RG tags

This commit is contained in:
Deluan 2023-02-09 17:45:38 -05:00
parent b0e58cb885
commit 0c3ac906b8
2 changed files with 5 additions and 8 deletions

View file

@ -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
}