mirror of
https://github.com/AynaLivePlayer/AynaLivePlayer.git
synced 2025-12-17 15:38:18 +08:00
new room gui
This commit is contained in:
@@ -1,25 +1,55 @@
|
||||
package config
|
||||
|
||||
type _PlayerConfig struct {
|
||||
Playlists []string
|
||||
PlaylistsProvider []string
|
||||
PlaylistIndex int
|
||||
PlaylistRandom bool
|
||||
AudioDevice string
|
||||
Volume float64
|
||||
SkipPlaylist bool
|
||||
PlaylistData string
|
||||
Playlists []*PlayerPlaylist `ini:"-"`
|
||||
//PlaylistsProvider []string
|
||||
PlaylistIndex int
|
||||
PlaylistRandom bool
|
||||
UserPlaylistRandom bool
|
||||
AudioDevice string
|
||||
Volume float64
|
||||
SkipPlaylist bool
|
||||
}
|
||||
|
||||
type PlayerPlaylist struct {
|
||||
ID string
|
||||
Provider string
|
||||
}
|
||||
|
||||
func (c *_PlayerConfig) Name() string {
|
||||
return "Player"
|
||||
}
|
||||
|
||||
var Player = &_PlayerConfig{
|
||||
Playlists: []string{"2382819181", "4987059624", "list1"},
|
||||
PlaylistsProvider: []string{"netease", "netease", "local"},
|
||||
PlaylistIndex: 0,
|
||||
PlaylistRandom: true,
|
||||
AudioDevice: "auto",
|
||||
Volume: 100,
|
||||
SkipPlaylist: false,
|
||||
func (c *_PlayerConfig) OnLoad() {
|
||||
//c.Playlists = make([]*PlayerPlaylist, 0)
|
||||
_ = LoadJson(c.PlaylistData, &c.Playlists)
|
||||
}
|
||||
|
||||
func (c *_PlayerConfig) OnSave() {
|
||||
_ = SaveJson(c.PlaylistData, &c.Playlists)
|
||||
}
|
||||
|
||||
var Player = &_PlayerConfig{
|
||||
PlaylistData: "playlists.json",
|
||||
Playlists: []*PlayerPlaylist{
|
||||
{
|
||||
"2382819181",
|
||||
"netease",
|
||||
},
|
||||
{
|
||||
"4987059624",
|
||||
"netease",
|
||||
},
|
||||
{
|
||||
"list1",
|
||||
"local",
|
||||
},
|
||||
},
|
||||
PlaylistIndex: 0,
|
||||
PlaylistRandom: true,
|
||||
UserPlaylistRandom: false,
|
||||
AudioDevice: "auto",
|
||||
Volume: 100,
|
||||
SkipPlaylist: false,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user