fix(pluginInfo): correct info object format - remove source field, fix version/description order

This commit is contained in:
TRAE Bot
2026-07-14 02:30:06 +00:00
parent 0918766e69
commit d10f45fac9
6 changed files with 24 additions and 54 deletions

View File

@@ -122,9 +122,7 @@ function formatGitItem(item) {
return { return {
id: String(songId), id: String(songId),
name: item.title || item.filename || '', name: item.title || item.filename || '',
artists: item.artist || '未知歌手', artists: item.artist || '未知歌手', pic: picUrl,
source: 'git',
pic: picUrl,
mPic: picUrl, mPic: picUrl,
sPic: picUrl, sPic: picUrl,
albumName: item.album || '未知专辑', albumName: item.album || '未知专辑',
@@ -226,9 +224,8 @@ var pluginInfo = {
info: { info: {
id: 'koneko_ceru_git', id: 'koneko_ceru_git',
name: 'GIT音源 - Koneko 聆澜', name: 'GIT音源 - Koneko 聆澜',
version: '0.1.4', description: 'GIT音源基于 GitCode audio_database.json 本地搜索 + Ceru 播放接口',
source: 'git', version: '0.1.4'
description: 'GIT音源基于 GitCode audio_database.json 本地搜索 + Ceru 播放接口'
}, },
ext: [], ext: [],
env: [{ key: 'ceru_key', name: 'Ceru API Key', description: '聆澜付费密钥。留空=公益模式(仅128k);填写=付费模式(高音质)。修改后下次播放自动生效,也可点扩展按钮激活' }], env: [{ key: 'ceru_key', name: 'Ceru API Key', description: '聆澜付费密钥。留空=公益模式(仅128k);填写=付费模式(高音质)。修改后下次播放自动生效,也可点扩展按钮激活' }],

View File

@@ -192,9 +192,7 @@ function handleSearchResult(rawList) {
list.push({ list.push({
id: String(item.mid), id: String(item.mid),
name: item.name + (item.title_extra || ''), name: item.name + (item.title_extra || ''),
artists: formatSingerName(item.singer, 'name'), artists: formatSingerName(item.singer, 'name'), pic: picUrl, mPic: picUrl, sPic: picUrl,
source: 'tx',
pic: picUrl, mPic: picUrl, sPic: picUrl,
albumName: albumName, albumName: albumName,
albumId: String(albumId || ''), albumId: String(albumId || ''),
interval: String(formatPlayTime(item.interval) || '--/--'), interval: String(formatPlayTime(item.interval) || '--/--'),
@@ -279,9 +277,7 @@ function musicDetail(songmid) {
return { return {
id: String(t.mid), id: String(t.mid),
name: t.name, name: t.name,
artists: singerName, artists: singerName, pic: picUrl,
source: 'tx',
pic: picUrl,
mPic: picUrl, mPic: picUrl,
sPic: picUrl, sPic: picUrl,
albumName: t.album ? t.album.name : '', albumName: t.album ? t.album.name : '',
@@ -346,9 +342,8 @@ var pluginInfo = {
info: { info: {
id: 'koneko_ceru_tx', id: 'koneko_ceru_tx',
name: 'QQ音乐 - Koneko 聆澜', name: 'QQ音乐 - Koneko 聆澜',
version: '0.1.4', description: 'QQ音乐音源基于 CeruMusic musicSdk 搜索 + Ceru 播放接口',
source: 'tx', version: '0.1.4'
description: 'QQ音乐音源基于 CeruMusic musicSdk 搜索 + Ceru 播放接口'
}, },
ext: [], ext: [],
env: [{ key: 'ceru_key', name: 'Ceru API Key', description: '聆澜付费密钥。留空=公益模式(仅128k);填写=付费模式(高音质)。修改后下次播放自动生效,也可点扩展按钮激活' }], env: [{ key: 'ceru_key', name: 'Ceru API Key', description: '聆澜付费密钥。留空=公益模式(仅128k);填写=付费模式(高音质)。修改后下次播放自动生效,也可点扩展按钮激活' }],

View File

@@ -118,9 +118,7 @@ function handleSearchResult(rawList) {
list.push({ list.push({
id: String(item.copyrightId || item.id || ''), id: String(item.copyrightId || item.id || ''),
name: stripEm(item.name || ''), name: stripEm(item.name || ''),
artists: stripEm(singerName), artists: stripEm(singerName), pic: picUrl, mPic: picUrl, sPic: picUrl,
source: 'mg',
pic: picUrl, mPic: picUrl, sPic: picUrl,
albumName: stripEm(albumName), albumName: stripEm(albumName),
albumId: albumId, albumId: albumId,
interval: '--/--', interval: '--/--',
@@ -210,9 +208,8 @@ var pluginInfo = {
info: { info: {
id: 'koneko_ceru_mg', id: 'koneko_ceru_mg',
name: '咪咕音乐 - Koneko 聆澜', name: '咪咕音乐 - Koneko 聆澜',
version: '0.1.4', description: '咪咕音乐音源,基于 CeruMusic musicSdk 搜索 + Ceru 播放接口',
source: 'mg', version: '0.1.4'
description: '咪咕音乐音源,基于 CeruMusic musicSdk 搜索 + Ceru 播放接口'
}, },
ext: [], ext: [],
env: [{ key: 'ceru_key', name: 'Ceru API Key', description: '聆澜付费密钥。留空=公益模式(仅128k);填写=付费模式(高音质)。修改后下次播放自动生效,也可点扩展按钮激活' }], env: [{ key: 'ceru_key', name: 'Ceru API Key', description: '聆澜付费密钥。留空=公益模式(仅128k);填写=付费模式(高音质)。修改后下次播放自动生效,也可点扩展按钮激活' }],

View File

@@ -183,9 +183,7 @@ function handleSearchResult(rawList) {
list.push({ list.push({
id: s.id ? String(s.id) : '', id: s.id ? String(s.id) : '',
name: s.name || '', name: s.name || '',
artists: artists.join('、'), artists: artists.join('、'), pic: pic, mPic: pic, sPic: pic,
source: 'wy',
pic: pic, mPic: pic, sPic: pic,
albumName: album, albumName: album,
albumId: albumId, albumId: albumId,
interval: formatPlayTime(s.duration), interval: formatPlayTime(s.duration),
@@ -279,9 +277,7 @@ function musicDetail(songmid) {
return { return {
id: String(s.id), id: String(s.id),
name: s.name, name: s.name,
artists: formatSingerName(s.ar, 'name'), artists: formatSingerName(s.ar, 'name'), pic: picUrl,
source: 'wy',
pic: picUrl,
mPic: picUrl, mPic: picUrl,
sPic: picUrl, sPic: picUrl,
albumName: s.al && s.al.name ? s.al.name : '', albumName: s.al && s.al.name ? s.al.name : '',
@@ -379,9 +375,7 @@ function leaderboardGetList(id, page) {
list.push({ list.push({
id: String(item.id), id: String(item.id),
name: item.name, name: item.name,
artists: formatSingerName(item.ar, 'name'), artists: formatSingerName(item.ar, 'name'), pic: picUrl,
source: 'wy',
pic: picUrl,
mPic: picUrl, mPic: picUrl,
sPic: picUrl, sPic: picUrl,
albumName: item.al && item.al.name ? item.al.name : '', albumName: item.al && item.al.name ? item.al.name : '',
@@ -455,9 +449,7 @@ var songList = {
img: p.coverImgUrl || '', img: p.coverImgUrl || '',
play_count: formatPlayCount(p.playCount), play_count: formatPlayCount(p.playCount),
total: p.trackCount || 0, total: p.trackCount || 0,
desc: p.description || '', desc: p.description || '', });
source: 'wy'
});
} }
return { list: list, total: res.body.total || 0, page: page, limit: limit, source: 'wy' }; return { list: list, total: res.body.total || 0, page: page, limit: limit, source: 'wy' };
}).catch(function() { return { list: [], total: 0, page: page, limit: limit, source: 'wy' }; }); }).catch(function() { return { list: [], total: 0, page: page, limit: limit, source: 'wy' }; });
@@ -481,9 +473,7 @@ var songList = {
list.push({ list.push({
id: String(item.id), id: String(item.id),
name: item.name, name: item.name,
artists: formatSingerName(item.ar, 'name'), artists: formatSingerName(item.ar, 'name'), pic: picUrl, mPic: picUrl, sPic: picUrl,
source: 'wy',
pic: picUrl, mPic: picUrl, sPic: picUrl,
albumName: item.al && item.al.name ? item.al.name : '', albumName: item.al && item.al.name ? item.al.name : '',
albumId: String(item.al && item.al.id ? item.al.id : ''), albumId: String(item.al && item.al.id ? item.al.id : ''),
interval: String(formatPlayTime((item.dt || 0) / 1000) || '--/--'), interval: String(formatPlayTime((item.dt || 0) / 1000) || '--/--'),
@@ -492,9 +482,7 @@ var songList = {
} }
return { return {
list: list, page: page, limit: limit, list: list, page: page, limit: limit,
total: playlist.trackIds ? playlist.trackIds.length : list.length, total: playlist.trackIds ? playlist.trackIds.length : list.length, info: { name: playlist.name, img: playlist.coverImgUrl, desc: playlist.description, author: playlist.creator && playlist.creator.nickname ? playlist.creator.nickname : '' }
source: 'wy',
info: { name: playlist.name, img: playlist.coverImgUrl, desc: playlist.description, author: playlist.creator && playlist.creator.nickname ? playlist.creator.nickname : '' }
}; };
}).catch(function() { return { list: [], total: 0, source: 'wy' }; }); }).catch(function() { return { list: [], total: 0, source: 'wy' }; });
}, },
@@ -628,9 +616,8 @@ var pluginInfo = {
info: { info: {
id: 'koneko_ceru_wy', id: 'koneko_ceru_wy',
name: '网易云音乐 - Koneko 聆澜', name: '网易云音乐 - Koneko 聆澜',
version: '0.1.5', description: '网易云音乐音源,基于 CeruMusic musicSdk 搜索 + Ceru 播放接口',
source: 'wy', version: '0.1.5'
description: '网易云音乐音源,基于 CeruMusic musicSdk 搜索 + Ceru 播放接口'
}, },
ext: [], ext: [],
env: [ env: [

View File

@@ -131,9 +131,7 @@ function handleSearchResult(rawList) {
list.push({ list.push({
id: String(songId), id: String(songId),
name: stripEm(info.SONGNAME || ''), name: stripEm(info.SONGNAME || ''),
artists: artistStr, artists: artistStr, pic: picUrl,
source: 'kw',
pic: picUrl,
mPic: picUrl, mPic: picUrl,
sPic: picUrl, sPic: picUrl,
albumName: stripEm(info.ALBUM || ''), albumName: stripEm(info.ALBUM || ''),
@@ -226,9 +224,8 @@ var pluginInfo = {
info: { info: {
id: 'koneko_ceru_kw', id: 'koneko_ceru_kw',
name: '酷我音乐 - Koneko 聆澜', name: '酷我音乐 - Koneko 聆澜',
version: '0.1.4', description: '酷我音乐音源,基于 CeruMusic musicSdk 搜索 + Ceru 播放接口',
source: 'kw', version: '0.1.4'
description: '酷我音乐音源,基于 CeruMusic musicSdk 搜索 + Ceru 播放接口'
}, },
ext: [], ext: [],
env: [{ key: 'ceru_key', name: 'Ceru API Key', description: '聆澜付费密钥。留空=公益模式(仅128k);填写=付费模式(高音质)。修改后下次播放自动生效,也可点扩展按钮激活' }], env: [{ key: 'ceru_key', name: 'Ceru API Key', description: '聆澜付费密钥。留空=公益模式(仅128k);填写=付费模式(高音质)。修改后下次播放自动生效,也可点扩展按钮激活' }],

View File

@@ -105,9 +105,7 @@ function handleSearchResult(rawList) {
list.push({ list.push({
id: String(item.hash || item.audio_id || ''), id: String(item.hash || item.audio_id || ''),
name: stripEm(item.songname || item.song_name || ''), name: stripEm(item.songname || item.song_name || ''),
artists: stripEm(item.singername || item.singer_name || ''), artists: stripEm(item.singername || item.singer_name || ''), pic: picUrl,
source: 'kg',
pic: picUrl,
mPic: picUrl, mPic: picUrl,
sPic: picUrl, sPic: picUrl,
albumName: stripEm(item.album_name || ''), albumName: stripEm(item.album_name || ''),
@@ -211,9 +209,8 @@ var pluginInfo = {
info: { info: {
id: 'koneko_ceru_kg', id: 'koneko_ceru_kg',
name: '酷狗音乐 - Koneko 聆澜', name: '酷狗音乐 - Koneko 聆澜',
version: '0.1.4', description: '酷狗音乐音源,基于 CeruMusic musicSdk 搜索 + Ceru 播放接口',
source: 'kg', version: '0.1.4'
description: '酷狗音乐音源,基于 CeruMusic musicSdk 搜索 + Ceru 播放接口'
}, },
ext: [], ext: [],
env: [{ key: 'ceru_key', name: 'Ceru API Key', description: '聆澜付费密钥。留空=公益模式(仅128k);填写=付费模式(高音质)。修改后下次播放自动生效,也可点扩展按钮激活' }], env: [{ key: 'ceru_key', name: 'Ceru API Key', description: '聆澜付费密钥。留空=公益模式(仅128k);填写=付费模式(高音质)。修改后下次播放自动生效,也可点扩展按钮激活' }],