mirror of
https://github.com/AynaLivePlayer/AynaLivePlayer.git
synced 2026-05-19 09:15:47 +08:00
config panel, kuwo source, playlist operation, bug fix @6, panic handling
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -1,23 +1,18 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"image/color"
|
||||
|
||||
"fyne.io/fyne/v2/app"
|
||||
"fyne.io/fyne/v2/canvas"
|
||||
"fyne.io/fyne/v2/container"
|
||||
"fyne.io/fyne/v2/layout"
|
||||
)
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
myApp := app.New()
|
||||
myWindow := myApp.NewWindow("Form Layout")
|
||||
|
||||
label1 := canvas.NewText("Label 1", color.Black)
|
||||
value1 := canvas.NewText("Value", color.Black)
|
||||
label2 := canvas.NewText("Label 2", color.Black)
|
||||
value2 := canvas.NewText("Something", color.Black)
|
||||
grid := container.New(layout.NewFormLayout(), label1, value1, label2, value2)
|
||||
myWindow.SetContent(grid)
|
||||
myWindow.ShowAndRun()
|
||||
defer func(x int) { fmt.Println(x) }(func() int { fmt.Println("build"); return 123 }())
|
||||
fmt.Println("main")
|
||||
//myApp := app.New()
|
||||
//myWindow := myApp.NewWindow("Form Layout")
|
||||
//
|
||||
//label1 := canvas.NewText("Label 1", color.Black)
|
||||
//value1 := canvas.NewText("Value", color.Black)
|
||||
//label2 := canvas.NewText("Label 2", color.Black)
|
||||
//value2 := canvas.NewText("Something", color.Black)
|
||||
//grid := container.New(layout.NewFormLayout(), label1, value1, label2, value2)
|
||||
//myWindow.SetContent(grid)
|
||||
//myWindow.ShowAndRun()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user