more stuff

This commit is contained in:
aynakeya
2024-04-15 16:07:31 -07:00
parent fbf8c7f149
commit 6ddcb507f5
17 changed files with 2339 additions and 74 deletions

View File

@@ -25,6 +25,6 @@ func (c *_cfg) OnSave() {
var cfg = &_cfg{
ApiServer: "http://localhost:9090",
LiveRoomPath: "liveroom.json",
LiveRoomPath: "./config/liverooms.json",
liveRooms: make([]model.LiveRoom, 0),
}

View File

@@ -10,6 +10,7 @@ import (
"errors"
liveroomsdk "github.com/AynaLivePlayer/liveroom-sdk"
"github.com/AynaLivePlayer/liveroom-sdk/provider/openblive"
"github.com/AynaLivePlayer/liveroom-sdk/provider/webdm"
)
type liveroom struct {
@@ -26,7 +27,7 @@ func Initialize() {
liveroomsdk.RegisterProvider(openblive.NewOpenBLiveClientProvider(cfg.ApiServer, 1661006726438))
// ignore web danmu client
//liveroomsdk.RegisterProvider(webdm.NewWebDanmuClientProvider(cfg.ApiServer))
liveroomsdk.RegisterProvider(webdm.NewWebDanmuClientProvider(cfg.ApiServer))
liveRooms = make(map[string]*liveroom, 0)

View File

@@ -42,8 +42,8 @@ func (p *playlistConfig) OnSave() {
var cfg = &playlistConfig{
PlayerPlaylistMode: model.PlaylistModeNormal,
SystemPlaylistMode: model.PlaylistModeNormal,
PlaylistsPath: "playlists.json",
SystemPlaylistMode: model.PlaylistModeRandom,
PlaylistsPath: "./config/playlists.json",
playlists: make([]miaosic.Playlist, 0),
}