mirror of
https://github.com/AynaLivePlayer/AynaLivePlayer.git
synced 2026-03-15 14:03:17 +08:00
add stderr redirection, add logo
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Printf("BiliAudioBot Revive %s\n", config.VERSION)
|
||||
fmt.Printf("BiliAudioBot Revive %s\n", config.Version)
|
||||
logger.Logger.SetLevel(logrus.DebugLevel)
|
||||
fmt.Println("Please enter room id")
|
||||
var roomid string
|
||||
|
||||
@@ -10,35 +10,20 @@ import (
|
||||
"AynaLivePlayer/plugin/textinfo"
|
||||
"AynaLivePlayer/plugin/webinfo"
|
||||
"AynaLivePlayer/plugin/wylogin"
|
||||
"fmt"
|
||||
"github.com/mitchellh/panicwrap"
|
||||
"os"
|
||||
)
|
||||
|
||||
func init() {
|
||||
exitStatus, _ := panicwrap.BasicWrap(func(s string) {
|
||||
logger.Logger.Panic(s)
|
||||
os.Exit(1)
|
||||
return
|
||||
})
|
||||
if exitStatus >= 0 {
|
||||
os.Exit(exitStatus)
|
||||
}
|
||||
}
|
||||
|
||||
var plugins = []controller.Plugin{diange.NewDiange(), qiege.NewQiege(), textinfo.NewTextInfo(), webinfo.NewWebInfo(),
|
||||
wylogin.NewWYLogin()}
|
||||
|
||||
func main() {
|
||||
fmt.Printf("BiliAudioBot Revive %s\n", config.VERSION)
|
||||
logger.Logger.Info("================Program Start================")
|
||||
logger.Logger.Infof("================Current Version: %s================", config.Version)
|
||||
controller.Initialize()
|
||||
controller.LoadPlugins(plugins...)
|
||||
defer func() {
|
||||
controller.Destroy()
|
||||
config.SaveToConfigFile(config.CONFIG_PATH)
|
||||
//i18n.SaveTranslation()
|
||||
}()
|
||||
gui.Initialize()
|
||||
gui.MainWindow.ShowAndRun()
|
||||
controller.ClosePlugins(plugins...)
|
||||
controller.Destroy()
|
||||
_ = config.SaveToConfigFile(config.ConfigPath)
|
||||
logger.Logger.Info("================Program End================")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user