ReplayGain support + audio normalization (web player) (#1988)

* ReplayGain support

- extract ReplayGain tags from files, expose via native api
- use metadata to normalize audio in web player

* make pre-push happy

* remove unnecessary prints

* remove another unnecessary print

* add tooltips, see metadata

* address comments, use settings instead

* remove console.log

* use better language for gain modes
This commit is contained in:
Kendall Garner 2023-01-17 20:52:00 +00:00 committed by Deluan
parent 9ae156dd82
commit 1324a16fc5
24 changed files with 411 additions and 56 deletions

View file

@ -75,6 +75,13 @@ func (s mediaFileMapper) toMediaFile(md metadata.Tags) model.MediaFile {
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
}