Cache(self.current_element)})
def _controls_answer(self):
- """Controls last.fm answer.
+ """Controls answer.
"""
status = self.current_element.get('response').get('status')
code = status.get('code')
else:
payload.update(name=artist.name)
payload.update(bucket='id:musicbrainz')
- payload.update(results=30)
+ payload.update(results=100)
return payload
def get_similar(self, artist=None):
as_artists = simaech.get_similar(artist=current)
self.log.debug('Requesting EchoNest for "{0}"'.format(current))
try:
- [as_art.append(str(a)) for a in as_artists]
+ for art in as_artists:
+ if len(as_art) > self.plugin_conf.getint('artists'):
+ break
+ as_art.append(str(art))
except EchoNotFound as err:
self.log.warning(err)
except EchoError as err:
'history getting too large?')
return None
for track in self.to_add:
- self.log.info('last.fm candidate: {0!s}'.format(track))
+ self.log.info('echonest candidates: {0!s}'.format(track))
def _album(self):
"""Get albums for album queue mode
},
'echonest': {
'queue_mode': "track", #TODO control values
+ 'artists': "80",
'single_album': "false",
'track_to_add': "1",
'album_to_add': "1",