config panel, kuwo source, playlist operation, bug fix @6, panic handling

This commit is contained in:
Aynakeya
2022-06-25 14:08:50 -07:00
parent 9f75839ebc
commit 0a53e8220e
40 changed files with 920 additions and 3992 deletions

View File

@@ -5,14 +5,30 @@ import (
"AynaLivePlayer/controller"
"AynaLivePlayer/gui"
"AynaLivePlayer/logger"
"AynaLivePlayer/plugin/diange"
"AynaLivePlayer/plugin/qiege"
"fmt"
"github.com/mitchellh/panicwrap"
"github.com/sirupsen/logrus"
"os"
)
func init() {
exitStatus, _ := panicwrap.BasicWrap(func(s string) {
logger.Logger.Panic(s)
os.Exit(1)
return
})
if exitStatus >= 0 {
os.Exit(exitStatus)
}
}
func main() {
fmt.Printf("BiliAudioBot Revive %s\n", config.VERSION)
logger.Logger.SetLevel(logrus.DebugLevel)
controller.Initialize()
controller.LoadPlugins(diange.NewDiange(), qiege.NewQiege())
defer func() {
controller.Destroy()
config.SaveToConfigFile(config.CONFIG_PATH)