from .meta import Artist, MetaContainer
from ..utils.utils import WSError, WSNotFound, WSTimeout
from .meta import Artist, MetaContainer
from ..utils.utils import WSError, WSNotFound, WSTimeout
else:
results = func(*args, **kwargs)
cls.log.debug('caching request')
else:
results = func(*args, **kwargs)
cls.log.debug('caching request')
self.log.trace('Already queued: %s', queued_artists)
self.log.trace('Candidate: %s', ret)
if ret & queued_artists:
self.log.trace('Already queued: %s', queued_artists)
self.log.trace('Candidate: %s', ret)
if ret & queued_artists:
candidates = candidates[0:nbtracks]
self.to_add.extend(candidates)
if nb_album_add == target_album_to_add:
candidates = candidates[0:nbtracks]
self.to_add.extend(candidates)
if nb_album_add == target_album_to_add:
def find_top(self, artists):
"""
find top tracks for artists in artists list.
"""
self.to_add = list()
def find_top(self, artists):
"""
find top tracks for artists in artists list.
"""
self.to_add = list()
for artist in artists:
self.log.debug('Trying to find titles to add for "%r"', artist)
found = self.player.find_tracks(artist)
for artist in artists:
self.log.debug('Trying to find titles to add for "%r"', artist)
found = self.player.find_tracks(artist)
for track in self.to_add:
self.log.info('%s candidates: %s', track, self.ws.name)
for track in self.to_add:
self.log.info('%s candidates: %s', track, self.ws.name)
self.log.info('No last track, cannot queue')
return None
if not self.player.playlist[-1].artist:
self.log.info('No last track, cannot queue')
return None
if not self.player.playlist[-1].artist: