# local import
from ...lib.plugin import Plugin
-from ...lib.simaecho import SimaEch, EchoError, EchoNotFound
+from ...lib.simaecho import SimaEch, EchoError
from ...lib.track import Track
from ...lib.meta import Artist
try:
# TODO: let's propagate Artist type
[as_art.append(str(art)) for art in as_artists]
- except EchoNotFound as err:
- self.log.warning(err)
except EchoError as err:
self.log.warning('EchoNest: {0}'.format(err))
if as_art:
- self.log.debug('Fetched {0} artist(s) from echonest'.format(
- len(as_art)))
+ self.log.debug('Fetched {0} artist(s)'.format(len(as_art)))
self.log.debug('x-ratelimit-remaining: {}'.format(SimaEch.ratelimit))
return as_art
def callback_need_track(self):
self._cleanup_cache()
if not self.player.current:
- self.log.info('Not currently playing track, cannot queue')
+ self.log.info('No current track, cannot queue')
+ return None
+ if not self.player.current.artist:
+ self.log.warning('No artist set for the current track')
+ self.log.debug(repr(self.player.current))
return None
self.queue_mode()
candidates = self.to_add