mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
🐞 fix: 修复netease无法解析歌曲问题
This commit is contained in:
parent
94b30c66f1
commit
0954d6f1ca
@ -1,5 +1,5 @@
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { downloadMp3, generateRandomStr } from "./common.js";
|
import { downloadAudio, generateRandomStr } from "./common.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取音频
|
* 获取音频
|
||||||
@ -28,7 +28,7 @@ async function getBodianAudio(id, path) {
|
|||||||
.then(async resp => {
|
.then(async resp => {
|
||||||
const respJson = resp.data;
|
const respJson = resp.data;
|
||||||
const audioUrl = respJson.data.audioUrl;
|
const audioUrl = respJson.data.audioUrl;
|
||||||
await downloadMp3(audioUrl, path)
|
await downloadAudio(audioUrl, path)
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
console.error(`下载音乐失败,错误信息为: ${err.message}`);
|
console.error(`下载音乐失败,错误信息为: ${err.message}`);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user