results = cls._cache.get('asearch').get(hashedlst)
else:
results = func(*args, **kwargs)
+ cls.log.debug('caching request')
cls._cache.get('asearch').update({hashedlst:list(results)})
random.shuffle(results)
return results
if self.sdb.get_bl_album(trk, add_not=True):
self.log.info('Blacklisted album: {0}: '.format(trk))
continue
+ # Should use albumartist heuristic as well
+ if self.plugin_conf.getboolean('single_album'):
+ if (trk.album == self.player.current.album or
+ trk.album in [tr.album for tr in self.to_add]):
+ self.log.debug('Found unplayed track ' +
+ 'but from an album already queued: %s' % (trk))
+ continue
candidate.append(trk)
if not candidate:
self.log.debug('Unable to find title to add' +
for artist in extra_arts:
self.log.debug('Looking for artist similar to "{0.artist}" as well'.format(artist))
similar = self.lfm_similar_artists(artist=artist)
+ if not similar:
+ return ret_extra
similar = sorted(similar, key=lambda sim: sim[1], reverse=True)
ret_extra.extend(self.get_artists_from_player(similar))
if current.artist in ret_extra: