diff --git a/beetsplug/replaygain.py b/beetsplug/replaygain.py index 35229281d..75f1714aa 100644 --- a/beetsplug/replaygain.py +++ b/beetsplug/replaygain.py @@ -181,7 +181,7 @@ class Bs1770gainBackend(Backend): i += 1 returnchunk = self.compute_chunk_gain(chunk, is_album) albumgaintot += returnchunk[-1].gain - albumpeaktot += returnchunk[-1].peak + albumpeaktot = max(albumpeaktot, returnchunk[-1].peak) returnchunks = returnchunks + returnchunk[0:-1] returnchunks.append(Gain(albumgaintot / i, albumpeaktot / i)) return returnchunks diff --git a/docs/changelog.rst b/docs/changelog.rst index 45d8220fe..4091f6b90 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -23,6 +23,8 @@ New features: * The `absubmit` plugin now works in parallel (on Python 3 only). Thanks to :user:`bemeurer`. :bug:`2442` +* replaygain: albumpeak on large collections is calculated as average, not maximum + :bug:`3008` Fixes: