From 70a2ad354bfd39387fab8cd14337861c8acd7d47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Koutensk=C3=BD?= Date: Tue, 4 Jul 2017 15:53:02 +0200 Subject: [PATCH] fixes issue #2615 --- beetsplug/replaygain.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/beetsplug/replaygain.py b/beetsplug/replaygain.py index 69fa8d6c1d..8b4172a5a5 100644 --- a/beetsplug/replaygain.py +++ b/beetsplug/replaygain.py @@ -855,7 +855,7 @@ def album_requires_gain(self, album): # value. return self.overwrite or \ any([self.should_use_r128(item) and - (not item.r128_item_gain or not item.r128_album_gain) + (not item.r128_track_gain or not item.r128_album_gain) for item in album.items()]) or \ any([not self.should_use_r128(item) and (not item.rg_album_gain or not item.rg_album_peak) @@ -903,11 +903,11 @@ def handle_album(self, album, write): self._log.info(u'analyzing {0}', album) - if (any([self.should_use_r128(item) for item in album.items()]) and + if (any([self.should_use_r128(item) for item in album.items()]) and not all(([self.should_use_r128(item) for item in album.items()]))): raise ReplayGainError( u"Mix of ReplayGain and EBU R128 detected" - u"for some tracks in album {0}".format(album) + u" for some tracks in album {0}".format(album) ) if any([self.should_use_r128(item) for item in album.items()]):