mirror of
https://github.com/AynaLivePlayer/AynaLivePlayer.git
synced 2025-12-06 10:22:50 +08:00
update qqmusic wxlogin
This commit is contained in:
@@ -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{
|
||||
|
||||
Submodule pkg/miaosic updated: 15cadb4e5f...8f67b50eae
Reference in New Issue
Block a user