Compare commits

..

2 Commits

Author SHA1 Message Date
ee25eb17a6
docs: update readme 2026-02-23 23:30:55 +08:00
31d2ec9225
chore: clean up empty code change sections in the changes log 2026-02-23 23:12:01 +08:00
7 changed files with 16 additions and 79 deletions

View File

@ -3,7 +3,7 @@
- feat(cloud): 添加云盘上传模式选择功能并优化上传配置 (#116)
- refactor: Refactor random Chinese IP generator (#110)
- fix(server): Correctly inject client IP into request parameters (#108)
- 更加优雅的显示URL和调试按钮 (#109)
- refactor(ui): More elegant display of URL and debug buttons (#109)
### 4.30.1 | 2026.02.11
- feat: Add user playlist endpoints & domain overrides (#105)

View File

@ -1,4 +1,7 @@
# 网易云音乐 API Enhanced
<div align="center">
<h2>网易云音乐 API Enhanced</h2>
<p>网易云音乐第三方 Node.js API基于停更的原版 API 持续维护,支持丰富的音乐相关接口,适合自建服务、二次开发和多平台部署(如果原版诈尸, 我会及时同步 or 归档)。</p>
</div>
---
@ -204,7 +207,7 @@ pnpm test
| Java | [JackuXL](https://github.com/JackuXL) | [NeteaseCloudMusicApi-SDK](https://github.com/JackuXL/NeteaseCloudMusicApi-SDK) | 第三方 |
| Java | [1015770492](https://github.com/1015770492) | https://github.com/1015770492/yumbo-music-utils | 第三方 |
| Python | [盧瞳](https://github.com/2061360308) | [NeteaseCloudMusic_PythonSDK](https://github.com/2061360308/NeteaseCloudMusic_PythonSDK) | 第三方 |
| Swift | [Lincb](https://github.com/Lincb522/) | [NeteaseCloudMusicApi-Swift](https://github.com/Lincb522/NeteaseCloudMusicAPI-Swift) | 第三方 |
| Swift | [Lincb522](https://github.com/Lincb522) | [NeteaseCloudMusicApi-Swift](https://github.com/Lincb522/NeteaseCloudMusicAPI-Swift) | 第三方 |
### 依赖此项目的优秀开源项目
@ -213,6 +216,10 @@ pnpm test
- [qier2222/YesPlayMusic](https://github.com/qier222/YesPlayMusic)
- [MaigoLabs/amaoke.app](https://github.com/MaigoLabs/amaoke.app)
- [Yueby/music-together](https://github.com/Yueby/music-together)
## License
[MIT License](https://github.com/MoeFurina/NeteaseCloudMusicApiEnhanced/blob/main/LICENSE)

1
index.mjs Normal file
View File

@ -0,0 +1 @@
import './app.js'

View File

@ -1,77 +1,5 @@
// GD音乐台get(适配SPlayer的UNM-Server)
// 感谢来自GD Studio的开发API
// https://music.gdstudio.xyz/
const createOption = require('../util/option.js')
// 夹带私货的东西就不要放在这里了
module.exports = async (query, request) => {
try {
const { id, br = '320' } = query
if (!id) {
return {
status: 400,
body: {
code: 400,
message: '缺少必要参数 id',
data: [],
},
}
}
const validBR = ['128', '192', '320', '740', '999']
// const covertBR = ['128000', '192000', '320000','740000', '999000']
if (!validBR.includes(br)) {
return {
status: 400,
body: {
code: 400,
message: '无效音质参数',
allowed_values: validBR,
data: [],
},
}
}
const apiUrl = new URL('https://music-api.gdstudio.xyz/api.php')
apiUrl.searchParams.append('types', 'url')
apiUrl.searchParams.append('id', id)
apiUrl.searchParams.append('br', br)
const response = await fetch(apiUrl.toString())
if (!response.ok) throw new Error(`API 响应状态: ${response.status}`)
const result = await response.json()
// 代理逻辑
const useProxy = process.env.ENABLE_PROXY || false
const proxy = process.env.PROXY_URL
if (useProxy && result.url && result.url.includes('kuwo')) {
result.proxyUrl = proxy + result.url.replace(/^http:\/\//, 'http/')
}
return {
status: 200,
body: {
code: 200,
message: '请求成功',
data: {
id,
br,
url: result.url,
...(proxy && result.proxyUrl ? { proxyUrl: result.proxyUrl } : {}),
},
},
}
} catch (error) {
console.error('Error in song_url_ncmget:', error)
return {
status: 500,
body: {
code: 500,
message: '服务器处理请求失败',
...(process.env.NODE_ENV === 'development'
? { error: error.message }
: {}),
data: [],
},
}
}
return { status: 200, body: { code: 200, data: [] } }
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

After

Width:  |  Height:  |  Size: 100 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 1.9 MiB

View File

@ -263,8 +263,9 @@ async function consturctServer(moduleDefs) {
})
logger.info(`Request Success: ${decode(req.originalUrl)}`)
// 夹带私货部分如果开启了通用解锁并且是获取歌曲URL的接口则尝试解锁如果需要的话ヾ(≧▽≦*)o
if (
(req.baseUrl === '/song/url/v1' || req.baseUrl === '/song/url') &&
req.baseUrl === '/song/url/v1' &&
process.env.ENABLE_GENERAL_UNBLOCK === 'true'
) {
const song = moduleResponse.body.data[0]
@ -279,7 +280,7 @@ async function consturctServer(moduleDefs) {
logger.info('Starting unblock(uses general unblock):', req.query.id)
const result = await matchID(req.query.id)
song.url = result.data.url
song.freeTrialInfo = 'null'
song.freeTrialInfo = null
logger.info('Unblock success! url:', song.url)
}
if (song.url && song.url.includes('kuwo')) {