Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def access_network_queue(self, res):
if ControllerApi.network_manager.network_queue.empty():
LOG.info('Nothing in network queue')
return
item = ControllerApi.network_manager.network_queue.get_nowait()
item(res)
def get_songs(cls):
if ControllerApi.state['current_mid'] == 0:
ControllerApi.notify_widget.show_message("O.o", "无法寻找相似歌曲")
return []
songs = ControllerApi.api.get_simi_songs(ControllerApi.state['current_mid'])
return songs if songs else []
def toggle_lyric_widget(cls):
if ControllerApi.lyric_widget.isVisible():
ControllerApi.lyric_widget.close()
else:
ControllerApi.lyric_widget.show()