Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes issue #2615 - wrong r128 tag being accessed #2623

Merged
merged 1 commit into from
Jul 7, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions beetsplug/replaygain.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()]):
Expand Down