From 445b3e07fb7d67596db14c6c004ff8f7d3a97e91 Mon Sep 17 00:00:00 2001 From: Alan <1766447919@qq.com> Date: Tue, 27 Nov 2018 11:33:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E2=80=9C=E6=90=9C=E7=B4=A2->?= =?UTF-8?q?=E7=BD=91=E6=98=93=E7=B2=BE=E9=80=89=E9=9B=86=E2=80=9D=20(#772)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 1、修复歌单详情只有一首歌;2、缓存文件路径修改至~/.netseae-musicbox/nemcache.sqlite,而不是当前文件夹下的nemcache.sqlite;3、将旧版的每日推荐歌曲(非歌单)添加至当前版本 * 修复每过20分钟可能出现的播放错误 * 修复切换歌单时可能出现的切换不成功问题。如:当前播放歌曲为歌单1的第3首,想切换至歌单2的第3首时(索引位置一致,都为3),会出现UI歌名发生变化,歌曲却暂停播放、未切换 * 修复搜索歌曲出错 * 修复"搜索->网易精选集"出错 --- NEMbox/menu.py | 6 +++--- NEMbox/ui.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/NEMbox/menu.py b/NEMbox/menu.py index 25af6783..650c5eda 100644 --- a/NEMbox/menu.py +++ b/NEMbox/menu.py @@ -668,14 +668,14 @@ def dispatch_enter(self, idx): self.title += ' > ' + datalist[idx]['albums_name'] # 精选歌单选项 - elif datatype == 'playlists': + elif datatype == 'recommend_lists': data = self.datalist[idx] self.datatype = data['datatype'] self.datalist = netease.dig_info(data['callback'](), self.datatype) self.title += ' > ' + data['title'] # 全站置顶歌单包含的歌曲 - elif datatype == 'top_playlists': + elif datatype in ['top_playlists', 'playlists']: playlist_id = datalist[idx]['playlist_id'] songs = netease.playlist_detail(playlist_id) self.datatype = 'songs' @@ -826,7 +826,7 @@ def choice_channel(self, idx): 'callback': lambda: [] }] self.title += ' > 精选歌单' - self.datatype = 'playlists' + self.datatype = 'recommend_lists' elif idx == 4: myplaylist = self.request_api(self.api.user_playlist, self.userid) self.datatype = 'top_playlists' diff --git a/NEMbox/ui.py b/NEMbox/ui.py index 312381a2..1bec671d 100644 --- a/NEMbox/ui.py +++ b/NEMbox/ui.py @@ -362,7 +362,7 @@ def build_menu(self, datatype, title, datalist, offset, index, step, self.space + datalist[i][ 'artists_name']) - elif datatype == 'playlists': + elif datatype == 'recommend_lists': for i in range(offset, min(len(datalist), offset + step)): if i == index: self.addstr( @@ -374,7 +374,7 @@ def build_menu(self, datatype, title, datalist, offset, index, step, i - offset + 9, self.startcol, str(i) + '. ' + datalist[i]['title']) - elif datatype == 'top_playlists': + elif datatype in ('top_playlists', 'playlists'): for i in range(offset, min(len(datalist), offset + step)): if i == index: self.addstr(