def change_to_simi(self): PlaylistItem.de_active_all() if self.current_mode == 1: FmMode.exit_() elif self.current_mode == 2: ControllerApi.notify_widget.show_message("提示", "你正处于单曲电台模式") return self.current_mode = 2 ControllerApi.player.change_player_mode_to_other() SimiSongsMode.load_()
def _search_music(self): text = ViewOp.ui.SEARCH_BOX.text() if text != '': ViewOp.ui.STATUS_BAR.showMessage(u'正在搜索: ' + text) songs = ControllerApi.api.search(text) if not ControllerApi.api.is_response_ok(songs): return PlaylistItem.de_active_all() ViewOp.ui.WEBVIEW.load_brief_songs(songs) ControllerApi.state['current_pid'] = 0 length = len(songs) if length != 0: ViewOp.ui.STATUS_BAR.showMessage( u'搜索到 %s 首 %s 相关歌曲' % (str(length), text), 5000) return ViewOp.ui.STATUS_BAR.showMessage(u'Oops,没有找到相关歌曲', 5000) return