From a3770686b4987bf8b50001caa8438a4bbca96284 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Haa=C3=9F?= Date: Mon, 20 Aug 2018 23:38:12 +0200 Subject: [PATCH] to fix the peak calculation also delete the division --- beetsplug/replaygain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beetsplug/replaygain.py b/beetsplug/replaygain.py index 75f1714aa..ac45aa4f8 100644 --- a/beetsplug/replaygain.py +++ b/beetsplug/replaygain.py @@ -183,7 +183,7 @@ class Bs1770gainBackend(Backend): albumgaintot += returnchunk[-1].gain albumpeaktot = max(albumpeaktot, returnchunk[-1].peak) returnchunks = returnchunks + returnchunk[0:-1] - returnchunks.append(Gain(albumgaintot / i, albumpeaktot / i)) + returnchunks.append(Gain(albumgaintot / i, albumpeaktot)) return returnchunks else: return self.compute_chunk_gain(items, is_album)