mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-03-22 03:43:10 +00:00
Merge pull request #138 from NeteaseCloudMusicApiEnhanced/up-4.31.0
This commit is contained in:
commit
ff7c5518d1
4
.github/workflows/build-and-pr.yml
vendored
4
.github/workflows/build-and-pr.yml
vendored
@ -46,7 +46,7 @@ jobs:
|
|||||||
PKG_TARGET: ${{ matrix.target }}
|
PKG_TARGET: ${{ matrix.target }}
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v6
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: app-${{ matrix.platform }}
|
name: app-${{ matrix.platform }}
|
||||||
path: ${{ matrix.output }}
|
path: ${{ matrix.output }}
|
||||||
@ -62,7 +62,7 @@ jobs:
|
|||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Download all artifacts
|
- name: Download all artifacts
|
||||||
uses: actions/download-artifact@v7
|
uses: actions/download-artifact@v8
|
||||||
with:
|
with:
|
||||||
path: precompiled
|
path: precompiled
|
||||||
|
|
||||||
|
|||||||
9
module/dj_difm_all_style_channel.js
Normal file
9
module/dj_difm_all_style_channel.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
// DIFM电台 - 分类
|
||||||
|
|
||||||
|
const createOption = require('../util/option.js')
|
||||||
|
module.exports = (query, request) => {
|
||||||
|
const data = {
|
||||||
|
sources: query.sources || '[0]',
|
||||||
|
}
|
||||||
|
return request(`/api/dj/difm/all/style/channel/v2`, data, createOption(query))
|
||||||
|
}
|
||||||
9
module/dj_difm_channel_subscribe.js
Normal file
9
module/dj_difm_channel_subscribe.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
// DIFM电台 - 收藏频道
|
||||||
|
|
||||||
|
const createOption = require('../util/option.js')
|
||||||
|
module.exports = (query, request) => {
|
||||||
|
const data = {
|
||||||
|
id: query.id,
|
||||||
|
}
|
||||||
|
return request(`/api/dj/difm/channel/subscribe`, data, createOption(query))
|
||||||
|
}
|
||||||
9
module/dj_difm_channel_unsubscribe.js
Normal file
9
module/dj_difm_channel_unsubscribe.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
// DIFM电台 - 取消收藏频道
|
||||||
|
|
||||||
|
const createOption = require('../util/option.js')
|
||||||
|
module.exports = (query, request) => {
|
||||||
|
const data = {
|
||||||
|
id: query.id,
|
||||||
|
}
|
||||||
|
return request(`/api/dj/difm/channel/unsubscribe`, data, createOption(query))
|
||||||
|
}
|
||||||
11
module/dj_difm_playing_tracks_list.js
Normal file
11
module/dj_difm_playing_tracks_list.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// DIFM电台 - 播放列表
|
||||||
|
|
||||||
|
const createOption = require('../util/option.js')
|
||||||
|
module.exports = (query, request) => {
|
||||||
|
const data = {
|
||||||
|
limit: query.limit || 5,
|
||||||
|
source: query.source || 0,
|
||||||
|
channelId: query.channelId,
|
||||||
|
}
|
||||||
|
return request(`/api/dj/difm/playing/tracks/list`, data, createOption(query))
|
||||||
|
}
|
||||||
13
module/dj_difm_subscribe_channels_get.js
Normal file
13
module/dj_difm_subscribe_channels_get.js
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
// DIFM电台 - 收藏列表
|
||||||
|
|
||||||
|
const createOption = require('../util/option.js')
|
||||||
|
module.exports = (query, request) => {
|
||||||
|
const data = {
|
||||||
|
sources: query.sources || '[0]',
|
||||||
|
}
|
||||||
|
return request(
|
||||||
|
`/api/dj/difm/subscribe/channels/get/v2`,
|
||||||
|
data,
|
||||||
|
createOption(query),
|
||||||
|
)
|
||||||
|
}
|
||||||
23
package.json
23
package.json
@ -65,13 +65,14 @@
|
|||||||
"data"
|
"data"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@neteasecloudmusicapienhanced/unblockmusic-utils": "^0.2.3",
|
"@neteasecloudmusicapienhanced/unblockmusic-utils": "^0.2.4",
|
||||||
"axios": "^1.13.5",
|
"axios": "^1.13.6",
|
||||||
"crypto-js": "^4.2.0",
|
"crypto-js": "^4.2.0",
|
||||||
"dotenv": "^17.3.1",
|
"dotenv": "^17.3.1",
|
||||||
"express": "^5.2.1",
|
"express": "^5.2.1",
|
||||||
"express-fileupload": "^1.5.2",
|
"express-fileupload": "^1.5.2",
|
||||||
"music-metadata": "^11.12.1",
|
"gzip": "^0.1.0",
|
||||||
|
"music-metadata": "^11.12.3",
|
||||||
"node-forge": "^1.3.3",
|
"node-forge": "^1.3.3",
|
||||||
"pac-proxy-agent": "^7.2.0",
|
"pac-proxy-agent": "^7.2.0",
|
||||||
"qrcode": "^1.5.4",
|
"qrcode": "^1.5.4",
|
||||||
@ -81,22 +82,22 @@
|
|||||||
"yargs": "^18.0.0"
|
"yargs": "^18.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/eslintrc": "^3.3.3",
|
"@eslint/eslintrc": "^3.3.5",
|
||||||
"@eslint/js": "^9.39.3",
|
"@eslint/js": "^9.39.4",
|
||||||
"@types/express": "^5.0.6",
|
"@types/express": "^5.0.6",
|
||||||
"@types/express-fileupload": "^1.5.1",
|
"@types/express-fileupload": "^1.5.1",
|
||||||
"@types/mocha": "^10.0.10",
|
"@types/mocha": "^10.0.10",
|
||||||
"@types/node": "25.0.9",
|
"@types/node": "25.5.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.56.0",
|
"@typescript-eslint/eslint-plugin": "^8.57.1",
|
||||||
"@typescript-eslint/parser": "^8.56.0",
|
"@typescript-eslint/parser": "^8.57.1",
|
||||||
"eslint": "^9.39.3",
|
"eslint": "^9.39.4",
|
||||||
"eslint-config-prettier": "^10.1.8",
|
"eslint-config-prettier": "^10.1.8",
|
||||||
"eslint-plugin-html": "^8.1.4",
|
"eslint-plugin-html": "^8.1.4",
|
||||||
"eslint-plugin-prettier": "^5.5.5",
|
"eslint-plugin-prettier": "^5.5.5",
|
||||||
"globals": "^16.5.0",
|
"globals": "^17.4.0",
|
||||||
"husky": "^9.1.7",
|
"husky": "^9.1.7",
|
||||||
"intelli-espower-loader": "^1.1.0",
|
"intelli-espower-loader": "^1.1.0",
|
||||||
"lint-staged": "^16.2.7",
|
"lint-staged": "^16.4.0",
|
||||||
"mocha": "^11.7.5",
|
"mocha": "^11.7.5",
|
||||||
"nodemon": "^3.1.14",
|
"nodemon": "^3.1.14",
|
||||||
"pkg": "^5.8.1",
|
"pkg": "^5.8.1",
|
||||||
|
|||||||
478
pnpm-lock.yaml
generated
478
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -5143,6 +5143,72 @@ let data = encodeURIComponent(
|
|||||||
|
|
||||||
**调用例子 :** `/comment/reply?id=2058263032&commentId=123456789&content=我也觉得这首歌很棒!`
|
**调用例子 :** `/comment/reply?id=2058263032&commentId=123456789&content=我也觉得这首歌很棒!`
|
||||||
|
|
||||||
|
### DIFM电台 - 分类
|
||||||
|
|
||||||
|
说明: 调用此接口, 获取DIFM电台分类
|
||||||
|
|
||||||
|
**必选参数 :**
|
||||||
|
|
||||||
|
`sources`: 来源列表, 0: 最嗨电音 1: 古典电台 2: 爵士电台
|
||||||
|
|
||||||
|
**接口地址:** `/dj/difm/all/style/channel`
|
||||||
|
|
||||||
|
**调用例子:** `/dj/difm/all/style/channel?sources=[0]`
|
||||||
|
|
||||||
|
### DIFM电台 - 收藏列表
|
||||||
|
|
||||||
|
说明: 调用此接口, 获取DIFM电台收藏列表
|
||||||
|
|
||||||
|
**必选参数 :**
|
||||||
|
|
||||||
|
`sources`: 来源列表, 0: 最嗨电音 1: 古典电台 2: 爵士电台
|
||||||
|
|
||||||
|
**接口地址:** `/dj/difm/subscribe/channels/get`
|
||||||
|
|
||||||
|
**调用例子:** `/dj/difm/subscribe/channels/get?sources=[0]`
|
||||||
|
|
||||||
|
### DIFM电台 - 收藏频道
|
||||||
|
|
||||||
|
说明: 调用此接口, 可收藏DIFM频道
|
||||||
|
|
||||||
|
**必选参数 :**
|
||||||
|
|
||||||
|
`id`: 频道id
|
||||||
|
|
||||||
|
**接口地址:** `/dj/difm/channel/subscribe`
|
||||||
|
|
||||||
|
**调用例子:** `/dj/difm/channel/subscribe?id=1`
|
||||||
|
|
||||||
|
### DIFM电台 - 取消收藏频道
|
||||||
|
|
||||||
|
说明: 调用此接口, 可取消收藏DIFM频道
|
||||||
|
|
||||||
|
**必选参数 :**
|
||||||
|
|
||||||
|
`id`: 频道id
|
||||||
|
|
||||||
|
**接口地址:** `/dj/difm/channel/unsubscribe`
|
||||||
|
|
||||||
|
**调用例子:** `/dj/difm/channel/unsubscribe?id=1`
|
||||||
|
|
||||||
|
### DIFM电台 - 播放列表
|
||||||
|
|
||||||
|
说明: 调用此接口, 获取DIFM播放列表
|
||||||
|
|
||||||
|
**必选参数 :**
|
||||||
|
|
||||||
|
`source`: 来源, 0: 最嗨电音 1: 古典电台 2: 爵士电台
|
||||||
|
|
||||||
|
`channelId`: 频道id
|
||||||
|
|
||||||
|
**可选参数 :**
|
||||||
|
|
||||||
|
`limit`: 返回数量, 默认为 5
|
||||||
|
|
||||||
|
**接口地址:** `/dj/difm/playing/tracks/list`
|
||||||
|
|
||||||
|
**调用例子:** `/dj/difm/playing/tracks/list?source=0&channelId=1012`
|
||||||
|
|
||||||
## 离线访问此文档
|
## 离线访问此文档
|
||||||
|
|
||||||
此文档同时也是 Progressive Web Apps(PWA), 加入了 serviceWorker, 可离线访问
|
此文档同时也是 Progressive Web Apps(PWA), 加入了 serviceWorker, 可离线访问
|
||||||
|
|||||||
@ -240,6 +240,7 @@ const createRequest = (uri, data, options) => {
|
|||||||
headers['User-Agent'] = options.ua || chooseUserAgent('api', 'iphone')
|
headers['User-Agent'] = options.ua || chooseUserAgent('api', 'iphone')
|
||||||
|
|
||||||
if (crypto === 'eapi') {
|
if (crypto === 'eapi') {
|
||||||
|
// headers['x-aeapi'] = true // 服务器会使用gzip压缩返回值
|
||||||
data.header = header
|
data.header = header
|
||||||
data.e_r = toBoolean(
|
data.e_r = toBoolean(
|
||||||
options.e_r !== undefined
|
options.e_r !== undefined
|
||||||
@ -323,6 +324,7 @@ const createRequest = (uri, data, options) => {
|
|||||||
if (crypto === 'eapi' && data.e_r) {
|
if (crypto === 'eapi' && data.e_r) {
|
||||||
answer.body = encrypt.eapiResDecrypt(
|
answer.body = encrypt.eapiResDecrypt(
|
||||||
body.toString('hex').toUpperCase(),
|
body.toString('hex').toUpperCase(),
|
||||||
|
headers['x-aeapi'],
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
answer.body =
|
answer.body =
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user