From 827231bf23fc7ced23a0410f7861393193df07be Mon Sep 17 00:00:00 2001 From: TRAE Bot Date: Sun, 5 Jul 2026 16:12:55 +0000 Subject: [PATCH] fix: revert getUrl to 2 params (songInfo, type); fix all search fields to pic/mPic/sPic/qualities --- 聆澜/Koneko_聆澜_GIT音源_v0.1.0_QZv2.js | 2 +- 聆澜/Koneko_聆澜_QQ音乐_v0.1.0_QZv2.js | 32 ++++++++++------------ 聆澜/Koneko_聆澜_咪咕音乐_v0.1.0_QZv2.js | 2 +- 聆澜/Koneko_聆澜_网易云音乐_v0.1.0_QZv2.js | 2 +- 聆澜/Koneko_聆澜_酷我音乐_v0.1.0_QZv2.js | 2 +- 聆澜/Koneko_聆澜_酷狗音乐_v0.1.0_QZv2.js | 2 +- 6 files changed, 20 insertions(+), 22 deletions(-) diff --git a/聆澜/Koneko_聆澜_GIT音源_v0.1.0_QZv2.js b/聆澜/Koneko_聆澜_GIT音源_v0.1.0_QZv2.js index 645d2fd..85567c7 100644 --- a/聆澜/Koneko_聆澜_GIT音源_v0.1.0_QZv2.js +++ b/聆澜/Koneko_聆澜_GIT音源_v0.1.0_QZv2.js @@ -138,7 +138,7 @@ function search(str, page, limit, retryNum) { } // ===== 播放链接 ===== -function getUrl(source, songInfo, type) { +function getUrl(songInfo, type) { var q = (type === 'standard' ? '128k' : type === 'exhigh' ? '320k' : type === 'lossless' || type === 'hires' || type === 'jymaster' ? 'flac' : type) || '128k'; var songId = songInfo.id || ''; if (!songId) return Promise.resolve(''); diff --git a/聆澜/Koneko_聆澜_QQ音乐_v0.1.0_QZv2.js b/聆澜/Koneko_聆澜_QQ音乐_v0.1.0_QZv2.js index 2dbcbac..823cfc1 100644 --- a/聆澜/Koneko_聆澜_QQ音乐_v0.1.0_QZv2.js +++ b/聆澜/Koneko_聆澜_QQ音乐_v0.1.0_QZv2.js @@ -130,10 +130,11 @@ function handleSearchResult(rawList) { var item = rawList[i]; if (!item.file || !item.file.media_mid) continue; var qualities = {}; - if (item.file.size_128mp3) qualities.standard = String(item.file.size_128mp3); - if (item.file.size_320mp3) qualities.exhigh = String(item.file.size_320mp3); - if (item.file.size_flac) qualities.lossless = String(item.file.size_flac); - if (item.file.size_hires) qualities.hires = String(item.file.size_hires); + var file = item.file; + if (file.size_128mp3 !== 0) qualities.standard = String(file.size_128mp3 || ''); + if (file.size_320mp3 !== 0) qualities.exhigh = String(file.size_320mp3 || ''); + if (file.size_flac !== 0) qualities.lossless = String(file.size_flac || ''); + if (file.size_hires !== 0) qualities.hires = String(file.size_hires || ''); var albumId = ''; var albumName = ''; if (item.album) { albumName = item.album.name; albumId = item.album.mid; } @@ -146,15 +147,16 @@ function handleSearchResult(rawList) { var picUrl = albumId ? 'https://y.gtimg.cn/music/photo_new/T002R500x500M000' + albumId + '.jpg' : (item.singer && item.singer.length ? 'https://y.gtimg.cn/music/photo_new/T001R500x500M000' + item.singer[0].mid + '.jpg' : ''); list.push({ id: item.mid, + songId: item.id, name: item.name + (item.title_extra || ''), artists: singerName, source: 'tx', + interval: formatPlayTime(item.interval), pic: picUrl, mPic: picUrl, sPic: picUrl, albumName: albumName, albumId: albumId, - interval: formatPlayTime(item.interval), qualities: qualities }); } @@ -175,9 +177,9 @@ function search(str, page, limit, retryNum) { } // ===== 播放链接 ===== -function getUrl(source, songInfo, type) { +function getUrl(songInfo, type) { var q = (type === 'standard' ? '128k' : type === 'exhigh' ? '320k' : type === 'lossless' || type === 'hires' || type === 'jymaster' ? 'flac' : type) || '128k'; - var songId = songInfo.id || ''; + var songId = songInfo.id || songInfo.songId || ''; var ceruKey = CERU_KEY || ''; var headers = { 'User-Agent': 'QZMusic/2.0' }; if (ceruKey) headers['X-API-Key'] = ceruKey; @@ -193,6 +195,7 @@ function getUrl(source, songInfo, type) { // ===== 封面图 ===== function getPic(songInfo) { if (songInfo.pic) return Promise.resolve(songInfo.pic); + if (songInfo.img) return Promise.resolve(songInfo.img); var albumId = songInfo.albumId || ''; if (albumId) return Promise.resolve('https://y.gtimg.cn/music/photo_new/T002R500x500M000' + albumId + '.jpg'); return Promise.resolve(''); @@ -227,16 +230,11 @@ function musicDetail(songmid) { if (t.singer && t.singer.length) { var ns = []; for (var j = 0; j < t.singer.length; j++) ns.push(t.singer[j].name); singerName = ns.join('、'); } var picUrl = albumId ? 'https://y.gtimg.cn/music/photo_new/T002R500x500M000' + albumId + '.jpg' : ''; return { - id: t.mid, - name: t.name, - artists: singerName, - source: 'tx', - pic: picUrl, - mPic: picUrl, - sPic: picUrl, - albumName: t.album ? t.album.name : '', - albumId: albumId, - interval: formatPlayTime(t.interval), + id: t.mid, songId: t.id, + name: t.name, artists: singerName, + albumName: t.album ? t.album.name : '', albumId: albumId, + source: 'tx', interval: formatPlayTime(t.interval), + pic: picUrl, mPic: picUrl, sPic: picUrl, qualities: {} }; } diff --git a/聆澜/Koneko_聆澜_咪咕音乐_v0.1.0_QZv2.js b/聆澜/Koneko_聆澜_咪咕音乐_v0.1.0_QZv2.js index 5bbd143..c92e087 100644 --- a/聆澜/Koneko_聆澜_咪咕音乐_v0.1.0_QZv2.js +++ b/聆澜/Koneko_聆澜_咪咕音乐_v0.1.0_QZv2.js @@ -119,7 +119,7 @@ function search(str, page, limit, retryNum) { } // ===== 播放链接 ===== -function getUrl(source, songInfo, type) { +function getUrl(songInfo, type) { var q = (type === 'standard' ? '128k' : type === 'exhigh' ? '320k' : type === 'lossless' || type === 'hires' || type === 'jymaster' ? 'flac' : type) || '128k'; var songId = songInfo.id || ''; var ceruKey = CERU_KEY || ''; diff --git a/聆澜/Koneko_聆澜_网易云音乐_v0.1.0_QZv2.js b/聆澜/Koneko_聆澜_网易云音乐_v0.1.0_QZv2.js index 1545fac..19e1f77 100644 --- a/聆澜/Koneko_聆澜_网易云音乐_v0.1.0_QZv2.js +++ b/聆澜/Koneko_聆澜_网易云音乐_v0.1.0_QZv2.js @@ -197,7 +197,7 @@ function search(str, page, limit, retryNum) { } // ===== 播放链接 ===== -function getUrl(source, songInfo, type) { +function getUrl(songInfo, type) { var q = (type === 'standard' ? '128k' : type === 'exhigh' ? '320k' : type === 'lossless' || type === 'hires' || type === 'jymaster' ? 'flac' : type) || '128k'; var songId = songInfo.id || ''; var ceruKey = CERU_KEY || ''; diff --git a/聆澜/Koneko_聆澜_酷我音乐_v0.1.0_QZv2.js b/聆澜/Koneko_聆澜_酷我音乐_v0.1.0_QZv2.js index 84f3304..d3f6c2e 100644 --- a/聆澜/Koneko_聆澜_酷我音乐_v0.1.0_QZv2.js +++ b/聆澜/Koneko_聆澜_酷我音乐_v0.1.0_QZv2.js @@ -109,7 +109,7 @@ function search(str, page, limit, retryNum) { } // ===== 播放链接 ===== -function getUrl(source, songInfo, type) { +function getUrl(songInfo, type) { var q = (type === 'standard' ? '128k' : type === 'exhigh' ? '320k' : type === 'lossless' || type === 'hires' || type === 'jymaster' ? 'flac' : type) || '128k'; var songId = songInfo.id || ''; var ceruKey = CERU_KEY || ''; diff --git a/聆澜/Koneko_聆澜_酷狗音乐_v0.1.0_QZv2.js b/聆澜/Koneko_聆澜_酷狗音乐_v0.1.0_QZv2.js index 5b3d744..a06b6cd 100644 --- a/聆澜/Koneko_聆澜_酷狗音乐_v0.1.0_QZv2.js +++ b/聆澜/Koneko_聆澜_酷狗音乐_v0.1.0_QZv2.js @@ -109,7 +109,7 @@ function search(str, page, limit, retryNum) { } // ===== 播放链接 ===== -function getUrl(source, songInfo, type) { +function getUrl(songInfo, type) { var q = (type === 'standard' ? '128k' : type === 'exhigh' ? '320k' : type === 'lossless' || type === 'hires' || type === 'jymaster' ? 'flac' : type) || '128k'; var songId = songInfo.id || ''; var ceruKey = CERU_KEY || '';