url = Request('GET', self._url, params=payload,).prepare().url
if url in SimaFM.cache:
self.current_element = SimaFM.cache.get(url).elem
- print('is cached')
return
try:
self._fetch_ech(payload)
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
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