update qqmusic wxlogin

This commit is contained in:
aynakeya
2025-09-29 23:23:23 +08:00
parent f13577f890
commit a81eb4a131
2 changed files with 9 additions and 2 deletions

View File

@@ -12,11 +12,12 @@ import (
_ "github.com/AynaLivePlayer/miaosic/providers/kuwo"
"github.com/AynaLivePlayer/miaosic/providers/local"
_ "github.com/AynaLivePlayer/miaosic/providers/netease"
_ "github.com/AynaLivePlayer/miaosic/providers/qq"
"github.com/AynaLivePlayer/miaosic/providers/qq"
)
type _sourceConfig struct {
LocalSourcePath string
QQChannel string
}
func (_ _sourceConfig) Name() string {
@@ -31,12 +32,18 @@ func (_ _sourceConfig) OnSave() {
var sourceCfg = &_sourceConfig{
LocalSourcePath: "./music",
QQChannel: "qq",
}
func Initialize() {
config.LoadConfig(sourceCfg)
kugou.UseInstrumental()
miaosic.RegisterProvider(local.NewLocal(sourceCfg.LocalSourcePath))
if sourceCfg.QQChannel == "wechat" {
qq.UseWechatLogin()
} else {
qq.UseQQLogin()
}
_ = global.EventBus.Publish(
events.MediaProviderUpdate, events.MediaProviderUpdateEvent{