From 996396c943d5bf366d2b51ce65e9f2e78dc2767d Mon Sep 17 00:00:00 2001 From: lyswhut Date: Fri, 4 Feb 2022 18:29:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=87=E6=BB=A4tx=E6=BA=90=E6=9F=90=E4=BA=9B?= =?UTF-8?q?=E4=B8=8D=E6=94=AF=E6=8C=81=E6=92=AD=E6=94=BE=E7=9A=84=E6=AD=8C?= =?UTF-8?q?=E6=9B=B2=EF=BC=8C=E8=A7=A3=E5=86=B3=E6=92=AD=E6=94=BE=E6=AD=A4?= =?UTF-8?q?=E7=B1=BB=E5=86=85=E5=AE=B9=E4=BC=9A=E5=AF=BC=E8=87=B4=E6=84=8F?= =?UTF-8?q?=E5=A4=96=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- publish/changeLog.md | 7 +------ src/renderer/utils/music/tx/musicSearch.js | 10 +++++++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/publish/changeLog.md b/publish/changeLog.md index ac15941d..a2b5e790 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -1,11 +1,6 @@ ### 优化 -- 优化kw源英文与翻译歌词的匹配 - -### 修复 - -- 修复快捷键与默认按键行为冲突的问题,现在若将某些有默认行为的按键(如在列表中上、下箭头、Home、End等键可以使列表滚动)设置为快捷键时,将禁用其默认行为 -- 修复列表的聚焦问题,现在在列表中使用上、下箭头、空格等键滚动列表时不会导致滚动到一定距离后丢失焦点的问题 +- 过滤tx源某些不支持播放的歌曲,解决播放此类内容会导致意外的问题 ### 其他 diff --git a/src/renderer/utils/music/tx/musicSearch.js b/src/renderer/utils/music/tx/musicSearch.js index ffe1328d..00d84627 100644 --- a/src/renderer/utils/music/tx/musicSearch.js +++ b/src/renderer/utils/music/tx/musicSearch.js @@ -32,7 +32,10 @@ export default { }, handleResult(rawList) { // console.log(rawList) - return rawList.map(item => { + const list = [] + rawList.forEach(item => { + if (!item.strMediaMid) return + let types = [] let _types = {} if (item.size128 !== 0) { @@ -64,7 +67,7 @@ export default { } } // types.reverse() - return { + list.push({ singer: this.getSinger(item.singer), name: item.songname, albumName: item.albumname, @@ -83,8 +86,9 @@ export default { types, _types, typeUrl: {}, - } + }) }) + return list }, search(str, page = 1, { limit } = {}) { if (limit == null) limit = this.limit