mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-08-12 08:50:38 +00:00
fixes
This commit is contained in:
parent
543660fcdf
commit
a2a2a40d71
@ -239,7 +239,7 @@ module.exports = async (query, request) => {
|
|||||||
const res = await request(
|
const res = await request(
|
||||||
`/api/ad/listening/rights/gain`,
|
`/api/ad/listening/rights/gain`,
|
||||||
data,
|
data,
|
||||||
createOption(query, 'eapi', 'v2'),
|
createOption(query, 'xeapi', 'v3'),
|
||||||
)
|
)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@ -114,6 +114,16 @@ async function ensureWatchman() {
|
|||||||
// 获取新 token
|
// 获取新 token
|
||||||
async function fetchToken() {
|
async function fetchToken() {
|
||||||
const instance = await ensureWatchman()
|
const instance = await ensureWatchman()
|
||||||
|
const raw = instance.getInstance()
|
||||||
|
|
||||||
|
await new Promise((resolve) => {
|
||||||
|
const timer = setTimeout(() => resolve(), 15000)
|
||||||
|
raw.I(() => {
|
||||||
|
clearTimeout(timer)
|
||||||
|
resolve()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
const timer = setTimeout(() => resolve(''), 15000)
|
const timer = setTimeout(() => resolve(''), 15000)
|
||||||
instance.getToken(BUSINESS_ID, (tk) => {
|
instance.getToken(BUSINESS_ID, (tk) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user