feat: 支持解灰手动选择音源

This commit is contained in:
IamFurina
2025-08-24 23:09:56 +08:00
committed by ImFurina
parent 0c99618380
commit 0ee7b55f99
5 changed files with 13 additions and 6 deletions
+2 -1
View File
@@ -253,7 +253,8 @@ async function consturctServer(moduleDefs) {
const song = moduleResponse['body']['data'][0]
if (song.freeTrialInfo !== null || !song.url || [1, 4].includes(song.fee)) {
const match = require('@unblockneteasemusic/server')
const source = ['pyncmd','kuwo', 'qq', 'migu', 'kugou']
const source = process.env.UNBLOCK_SOURCE ? process.env.UNBLOCK_SOURCE.split(',') : ['pyncmd', 'kuwo', 'qq', 'migu', 'kugou']
console.log("开始解灰", source)
const { url } = await match(req.query.id, source)
song.url = url
song.freeTrialInfo = 'null'