Merge pull request #2294 from anshuman73/master

Fixed #2200 and a small typo
This commit is contained in:
Adrian Sampson 2017-06-10 20:50:50 -04:00
commit 290162a7eb
2 changed files with 13 additions and 2 deletions

View file

@ -333,11 +333,22 @@ def album_info(release):
disambig.append(release.get('disambiguation'))
info.albumdisambig = u', '.join(disambig)
# Release type not always populated.
# Retrieves the Release type.
# Considers all other release types(including primary and secondary) (new)
# and logs them.
if 'type' in release['release-group']:
reltype = release['release-group']['type']
if reltype:
info.albumtype = reltype.lower()
if 'primary-type' in release['release-group']:
rel_primarytype = release['release-group']['primary-type']
if rel_primarytype:
log.debug('Primary Type (new data): ' + rel_primarytype.lower())
if 'secondary-type-list' in release['release-group']:
if release['release-group']['secondary-type-list']:
log.debug('Secondary Type(s) (new data): ' + ', '.join(
[secondarytype.lower() for secondarytype in
release['release-group']['secondary-type-list']]))
# Release events.
info.country, release_date = _preferred_release_event(release)

View file

@ -80,7 +80,7 @@ class MusicBrainzCollectionPlugin(BeetsPlugin):
self.update_album_list([task.album])
def update_album_list(self, album_list):
"""Update the MusicBrainz colleciton from a list of Beets albums
"""Update the MusicBrainz collection from a list of Beets albums
"""
# Get the available collections.
collections = mb_call(musicbrainzngs.get_collections)