add v2 compatible config.

This commit is contained in:
Miroslav Šedivý
2024-07-18 21:48:09 +02:00
parent f2eab73847
commit dbf9fc6ebc
10 changed files with 889 additions and 0 deletions

View File

@ -87,6 +87,27 @@ func (c *serve) Init(cmd *cobra.Command) error {
return err
}
// V2 configuration
if err := c.configs.Desktop.InitV2(cmd); err != nil {
return err
}
if err := c.configs.Capture.InitV2(cmd); err != nil {
return err
}
if err := c.configs.WebRTC.InitV2(cmd); err != nil {
return err
}
if err := c.configs.Member.InitV2(cmd); err != nil {
return err
}
if err := c.configs.Session.InitV2(cmd); err != nil {
return err
}
if err := c.configs.Server.InitV2(cmd); err != nil {
return err
}
return nil
}
@ -100,6 +121,13 @@ func (c *serve) PreRun(cmd *cobra.Command, args []string) {
c.configs.Session.Set()
c.configs.Plugins.Set()
c.configs.Server.Set()
c.configs.Desktop.SetV2()
c.configs.Capture.SetV2()
c.configs.WebRTC.SetV2()
c.configs.Member.SetV2()
c.configs.Session.SetV2()
c.configs.Server.SetV2()
}
func (c *serve) Start(cmd *cobra.Command) {