From cb7c6bfb69a0d01a06f1d444f1518c0b1e00a34c Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Sat, 4 Feb 2017 14:16:11 -0600 Subject: [PATCH] Use free-form MP4 tag for album gain (#2426) I'm not sure how this got messed up, but this was: - Trying to store album gain in the track peak part of the SoundCheck tag! - Not writing the album gain to the non-SC free-form RG tag! Together, this led to serious weirdness when writing these fields on AAC files. To be clear, we currently *only* support track-level data for SoundCheck. We also record album-level RG information in non-iTunes tags, but that's separate. A little googling suggests that SoundCheck now has album-level data, but supporting that is a separate issue. --- beets/mediafile.py | 6 +++--- docs/changelog.rst | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/beets/mediafile.py b/beets/mediafile.py index c910c9a86..13f1b2dfb 100644 --- a/beets/mediafile.py +++ b/beets/mediafile.py @@ -1941,9 +1941,9 @@ class MediaFile(object): u'replaygain_album_gain', float_places=2, suffix=u' dB' ), - MP4SoundCheckStorageStyle( - '----:com.apple.iTunes:iTunNORM', - index=1 + MP4StorageStyle( + '----:com.apple.iTunes:replaygain_album_gain', + float_places=2, suffix=' dB' ), StorageStyle( u'REPLAYGAIN_ALBUM_GAIN', diff --git a/docs/changelog.rst b/docs/changelog.rst index 50a2ad518..3ec604a55 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -33,6 +33,8 @@ Fixes: requires version 0.4.2 or later of the ``python-mpd2`` library. :bug:`2405` * :doc:`/plugins/mpdstats`: Improve handling of mpd status queries. * :doc:`/plugins/badfiles`: Fix Python 3 compatibility. +* Fix some cases where album-level ReplayGain/SoundCheck metadata would be + written to files incorrectly. :bug:`2426` 1.4.3 (January 9, 2017)