mirror of
https://github.com/AynaLivePlayer/AynaLivePlayer.git
synced 2025-12-08 11:18:12 +08:00
add nosource
This commit is contained in:
37
internal/source/nosource.go
Normal file
37
internal/source/nosource.go
Normal file
@@ -0,0 +1,37 @@
|
||||
//go:build nosource
|
||||
|
||||
package source
|
||||
|
||||
import (
|
||||
"AynaLivePlayer/core/events"
|
||||
"AynaLivePlayer/global"
|
||||
"AynaLivePlayer/pkg/config"
|
||||
"github.com/AynaLivePlayer/miaosic"
|
||||
)
|
||||
|
||||
type _sourceConfig struct {
|
||||
LocalSourcePath string
|
||||
}
|
||||
|
||||
func (_ _sourceConfig) Name() string {
|
||||
return "Source"
|
||||
}
|
||||
|
||||
func (_ _sourceConfig) OnLoad() {
|
||||
}
|
||||
|
||||
func (_ _sourceConfig) OnSave() {
|
||||
}
|
||||
|
||||
var sourceCfg = &_sourceConfig{
|
||||
LocalSourcePath: "./music",
|
||||
}
|
||||
|
||||
func Initialize() {
|
||||
config.LoadConfig(sourceCfg)
|
||||
miaosic.RegisterProvider(&dummySource{})
|
||||
global.EventManager.CallA(
|
||||
events.MediaProviderUpdate, events.MediaProviderUpdateEvent{
|
||||
Providers: miaosic.ListAvailableProviders(),
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user