mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-03 20:47:35 +03:00
Enable ReplayGain by default and always import RG tags
This commit is contained in:
parent
b0e58cb885
commit
0c3ac906b8
2 changed files with 5 additions and 8 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue