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

Use release disambiguation not release-group disambiguation and more #87

Merged
merged 3 commits into from
Feb 2, 2013
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion beets/autotag/mb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down
8 changes: 7 additions & 1 deletion beets/ui/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
1 change: 1 addition & 0 deletions test/test_mb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down