From 430b578bd28ce8536d5778f32b75d6ffcec326b1 Mon Sep 17 00:00:00 2001 From: Peter Schnebel Date: Fri, 1 Feb 2013 15:14:42 +0100 Subject: [PATCH 1/3] Use release disambiguation not release-group disambiguation. I found 2 examples why I would prefer the release disambiguation: http://musicbrainz.org/release-group/d3f057b4-7e89-3018-9f84-9835ed9b4732 http://musicbrainz.org/release-group/6792b6d1-4e65-3c3c-9d20-d08aa1dcfc60 I did not find an example where the release-group disambiguation would be important (of course, that doesn't prove anything ;)) --- beets/autotag/mb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beets/autotag/mb.py b/beets/autotag/mb.py index f3fc6bcb46..f6900a40ec 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') From 9fa3aa7428a7d7f6d7c9509fe1b34f2f7ef83718 Mon Sep 17 00:00:00 2001 From: Peter Schnebel Date: Fri, 1 Feb 2013 15:48:15 +0100 Subject: [PATCH 2/3] Prefix media with number of media if >1 (e.g. 2xCD, 3xVinyl...) Show MBs disambiguation if set. --- beets/ui/commands.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/beets/ui/commands.py b/beets/ui/commands.py index 4ec2dcca9e..24cb209bee 100644 --- a/beets/ui/commands.py +++ b/beets/ui/commands.py @@ -371,7 +371,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)) From 663574c7ffa95e245aa6d8977b739305a6eac08e Mon Sep 17 00:00:00 2001 From: Peter Schnebel Date: Fri, 1 Feb 2013 18:10:11 +0100 Subject: [PATCH 3/3] Adapted test to pull request #87 --- test/test_mb.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test_mb.py b/test/test_mb.py index fdca856973..7e007e1e47 100644 --- a/test/test_mb.py +++ b/test/test_mb.py @@ -23,6 +23,7 @@ def _make_release(self, date_str='2009', tracks=None): 'title': 'ALBUM TITLE', 'id': 'ALBUM ID', 'asin': 'ALBUM ASIN', + 'disambiguation': 'DISAMBIGUATION', 'release-group': { 'type': 'Album', 'first-release-date': date_str,