修复分享出的酷狗码无法导入的问题

This commit is contained in:
Folltoshe 2023-02-26 15:00:25 +08:00 committed by GitHub
parent 72cffea653
commit ed5fb63805
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -517,6 +517,10 @@ export default {
id = id.toString() id = id.toString()
if (id.includes('special/single/')) { if (id.includes('special/single/')) {
id = id.replace(this.regExps.listDetailLink, '$1') id = id.replace(this.regExps.listDetailLink, '$1')
} else if (/#[0-9]+#/.test(id)) {
// fix 酷狗码导入
let code = /#[0-9]+#/.exec(id)[0]
if (code != null) return this.getUserListDetailByCode(code.replace(/#/g, ''))
} else if (/https?:/.test(id)) { } else if (/https?:/.test(id)) {
// fix https://www.kugou.com/songlist/xxx/?uid=xxx&chl=qq_client&cover=http%3A%2F%2Fimge.kugou.com%xxx.jpg&iszlist=1 // fix https://www.kugou.com/songlist/xxx/?uid=xxx&chl=qq_client&cover=http%3A%2F%2Fimge.kugou.com%xxx.jpg&iszlist=1
return this.getUserListDetail(id.replace(/^.*?http/, 'http'), page) return this.getUserListDetail(id.replace(/^.*?http/, 'http'), page)
@ -756,7 +760,3 @@ export default {
}) })
}, },
} }
// getList
// getTags
// getListDetail