Skip to content

Commit

Permalink
1.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
idranme committed Jul 3, 2024
1 parent 15735d9 commit fbc2428
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "koishi-plugin-music-downloadvoice-api",
"description": "Provide the selected song as a voice",
"version": "1.4.1",
"version": "1.4.2",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"files": [
Expand Down
9 changes: 4 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,13 @@ export function apply(ctx: Context, cfg: Config) {
search_type: 0,
num_per_page: 10,
page_num: 1,
highlight: 1,
highlight: 0,
nqc_flag: 0,
page_id: 1,
grp: 1
}
}
})
}, { responseType: 'json' })
}

async function generateSongListImage(listText: string, cfg: Config): Promise<Buffer> {
Expand Down Expand Up @@ -203,15 +203,14 @@ export function apply(ctx: Context, cfg: Config) {

let qq: SearchXZGResponse, netease: SearchXZGResponse
try {
let res = await searchQQ(keyword)
if (typeof res === 'string') res = JSON.parse(res)
const res = await searchQQ(keyword)
const item = res.request?.data?.body?.item_song
qq = {
code: res.code,
msg: '',
data: Array.isArray(item) ? item.map(v => {
return {
songname: v.title.replaceAll('<em>', '').replaceAll('</em>', ''),
songname: v.title,
album: v.album.name,
songid: v.id,
songurl: `https://y.qq.com/n/ryqq/songDetail/${v.mid}`,
Expand Down

0 comments on commit fbc2428

Please sign in to comment.