mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-06-13 18:47:17 +00:00
Apply suggestions from code review
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
parent
39e0e0718d
commit
cb5b2e7d0f
@ -60,8 +60,7 @@ const {
|
||||
console.log(' [2] 上传播放状态...')
|
||||
try {
|
||||
// 生成 sessionId(12 位大写字母和数字)
|
||||
const sessionId = Math.random().toString(36).substring(2, 8).toUpperCase() +
|
||||
Math.random().toString(36).substring(2, 8).toUpperCase()
|
||||
const sessionId = Array.from({ length: 12 }, () => 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'[Math.floor(Math.random() * 36)]).join('')
|
||||
|
||||
// 2.1 提交播放开始状态(relay_play_state_submit)
|
||||
const relayResult = await relay_play_state_submit({
|
||||
|
||||
@ -19,7 +19,7 @@ module.exports = (query, request) => {
|
||||
id: String(id),
|
||||
type: type
|
||||
},
|
||||
progress: progress,
|
||||
progress: Number(progress) || 0,
|
||||
sessionId: sessionId,
|
||||
playMode: playMode
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user