def albums_for_id(album_id): """Get a list of albums for an ID.""" candidates = [album_for_mbid(album_id)] plugin_albums = plugins.album_for_id(album_id) for a in plugin_albums: plugins.send('albuminfo_received', info=a) candidates.extend(plugin_albums) return filter(None, candidates)
def albums_for_id(album_id): """Get a list of albums for an ID.""" a = album_for_mbid(album_id) if a: yield a for a in plugins.album_for_id(album_id): if a: yield a
def albums_for_id(album_id): """Get a list of albums for an ID.""" a = album_for_mbid(album_id) if a: yield a for a in plugins.album_for_id(album_id): if a: plugins.send(u'albuminfo_received', info=a) yield a
def _album_for_id(album_id): """Get a list of albums corresponding to a release ID.""" candidates = [] # Candidates from MusicBrainz. try: candidates.append(mb.album_for_id(album_id)) except mb.MusicBrainzAPIError as exc: exc.log(log) # From plugins. candidates.extend(plugins.album_for_id(album_id)) return filter(None, candidates)
def albums_for_id(album_id): """Get a list of albums for an ID.""" candidates = [album_for_mbid(album_id)] candidates.extend(plugins.album_for_id(album_id)) return filter(None, candidates)