diff --git a/beets/autotag/mb.py b/beets/autotag/mb.py index 9da709160..8676126e9 100644 --- a/beets/autotag/mb.py +++ b/beets/autotag/mb.py @@ -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) diff --git a/beetsplug/mbcollection.py b/beetsplug/mbcollection.py index 909e6a0a5..99cb30d15 100644 --- a/beetsplug/mbcollection.py +++ b/beetsplug/mbcollection.py @@ -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)