diff --git a/beets/autotag/mb.py b/beets/autotag/mb.py index f3fc6bcb4..f6900a40e 100644 --- a/beets/autotag/mb.py +++ b/beets/autotag/mb.py @@ -188,7 +188,7 @@ def album_info(release): info.va = info.artist_id == VARIOUS_ARTISTS_ID info.asin = release.get('asin') info.releasegroup_id = release['release-group']['id'] - info.albumdisambig = release['release-group'].get('disambiguation') + info.albumdisambig = release.get('disambiguation') info.country = release.get('country') info.albumstatus = release.get('status') diff --git a/beets/ui/commands.py b/beets/ui/commands.py index c48484aa5..bdef48277 100644 --- a/beets/ui/commands.py +++ b/beets/ui/commands.py @@ -384,7 +384,13 @@ def choose_candidate(candidates, singleton, rec, cur_artist=None, if match.info.year: disambig.append(unicode(match.info.year)) if match.info.media: - disambig.append(match.info.media) + if match.info.mediums > 1: + disambig.append(u'{0}x{1}'.format( + match.info.mediums, match.info.media)) + else: + disambig.append(match.info.media) + if match.info.albumdisambig: + disambig.append(match.info.albumdisambig) if disambig: line += u' [{0}]'.format(u', '.join(disambig)) diff --git a/test/test_mb.py b/test/test_mb.py index fdca85697..7e007e1e4 100644 --- a/test/test_mb.py +++ b/test/test_mb.py @@ -23,6 +23,7 @@ class MBAlbumInfoTest(unittest.TestCase): 'title': 'ALBUM TITLE', 'id': 'ALBUM ID', 'asin': 'ALBUM ASIN', + 'disambiguation': 'DISAMBIGUATION', 'release-group': { 'type': 'Album', 'first-release-date': date_str,