feat: 添加音质选择 优化灰色歌曲解析

This commit is contained in:
alger
2025-01-06 20:54:42 +08:00
parent fcc47dc0ff
commit 020aca7384
12 changed files with 78 additions and 54 deletions
+2 -2
View File
@@ -12,8 +12,8 @@ if (!fs.existsSync(path.resolve(os.tmpdir(), 'anonymous_token'))) {
}
// 处理解锁音乐请求
ipcMain.handle('unblock-music', async (_, id) => {
return unblockMusic(id);
ipcMain.handle('unblock-music', async (_, id, data) => {
return unblockMusic(id, data);
});
import server from 'netease-cloud-music-api-alger/server';
+4 -3
View File
@@ -6,12 +6,13 @@
"host": "127.0.0.1",
"port": 7890
},
"enableRealIP":false,
"realIP":"",
"enableRealIP": false,
"realIP": "",
"noAnimate": false,
"animationSpeed": 1,
"author": "Alger",
"authorUrl": "https://github.com/algerkong",
"musicApiPort": 30488,
"closeAction": "ask"
"closeAction": "ask",
"musicQuality": "higher"
}
+2 -2
View File
@@ -1,8 +1,8 @@
import match from '@unblockneteasemusic/server';
const unblockMusic = async (id: any): Promise<any> => {
const unblockMusic = async (id: any, songData: any): Promise<any> => {
return new Promise((resolve, reject) => {
match(parseInt(id, 10), ['qq', 'migu', 'kugou', 'joox'])
match(parseInt(id, 10), ['qq', 'migu', 'kugou', 'joox'], songData)
.then((data) => {
resolve({
data: {