mirror of
https://github.com/onyx-and-iris/gobs-cli.git
synced 2026-01-11 08:27:51 +00:00
make Type arg optional, if not passed print current stream service settings.
this is a bugfix.
This commit is contained in:
parent
6eb8a5ffed
commit
30f40aee2e
22
README.md
22
README.md
@ -749,26 +749,28 @@ gobs-cli settings profile SimpleOutput VBitrate 6000
|
|||||||
```
|
```
|
||||||
|
|
||||||
- stream-service: Get/Set stream service setting.
|
- stream-service: Get/Set stream service setting.
|
||||||
- args: Type
|
|
||||||
- flags:
|
- flags:
|
||||||
- --key: Stream key.
|
- --key: Stream key.
|
||||||
- --server: Stream server URL.
|
- --server: Stream server URL.
|
||||||
|
|
||||||
|
*optional*
|
||||||
|
- args: Type
|
||||||
|
|
||||||
```console
|
```console
|
||||||
gobs-cli settings stream-service
|
gobs-cli settings stream-service
|
||||||
|
|
||||||
gobs-cli settings stream-service rtmp_common --key='live_xyzxyzxyzxyz'
|
gobs-cli settings stream-service --key='live_xyzxyzxyzxyz' rtmp_common
|
||||||
```
|
```
|
||||||
|
|
||||||
- video: Get/Set video setting.
|
- video: Get/Set video setting.
|
||||||
- flags:
|
- flags:
|
||||||
- --show: Show video settings.
|
- --show: Show video settings.
|
||||||
- --base-width: Base (canvas) width.
|
- --base-width: Base (canvas) width.
|
||||||
- --base-height: Base (canvas) height.
|
- --base-height: Base (canvas) height.
|
||||||
- --output-width: Output (scaled) width.
|
- --output-width: Output (scaled) width.
|
||||||
- --output-height: Output (scaled) height.
|
- --output-height: Output (scaled) height.
|
||||||
- --fps-num: Frames per second numerator.
|
- --fps-num: Frames per second numerator.
|
||||||
- --fps-den: Frames per second denominator.
|
- --fps-den: Frames per second denominator.
|
||||||
|
|
||||||
```console
|
```console
|
||||||
gobs-cli settings video --show
|
gobs-cli settings video --show
|
||||||
|
|||||||
@ -189,7 +189,7 @@ func (cmd *SettingsProfileCmd) Run(ctx *context) error {
|
|||||||
|
|
||||||
// SettingsStreamServiceCmd gets/ sets stream service settings.
|
// SettingsStreamServiceCmd gets/ sets stream service settings.
|
||||||
type SettingsStreamServiceCmd struct {
|
type SettingsStreamServiceCmd struct {
|
||||||
Type string `arg:"" help:"Stream type (e.g., rtmp_common, rtmp_custom)." required:""`
|
Type string `arg:"" help:"Stream type (e.g., rtmp_common, rtmp_custom)." optional:""`
|
||||||
Key string ` help:"Stream key." flag:""`
|
Key string ` help:"Stream key." flag:""`
|
||||||
Server string ` help:"Stream server URL." flag:""`
|
Server string ` help:"Stream server URL." flag:""`
|
||||||
}
|
}
|
||||||
@ -202,7 +202,7 @@ func (cmd *SettingsStreamServiceCmd) Run(ctx *context) error {
|
|||||||
return fmt.Errorf("failed to get stream service settings: %w", err)
|
return fmt.Errorf("failed to get stream service settings: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if cmd.Key == "" && cmd.Server == "" {
|
if cmd.Type == "" {
|
||||||
t := table.New().Border(lipgloss.RoundedBorder()).
|
t := table.New().Border(lipgloss.RoundedBorder()).
|
||||||
BorderStyle(lipgloss.NewStyle().Foreground(ctx.Style.border)).
|
BorderStyle(lipgloss.NewStyle().Foreground(ctx.Style.border)).
|
||||||
Headers("Stream Service Setting", "Value").
|
Headers("Stream Service Setting", "Value").
|
||||||
@ -219,7 +219,7 @@ func (cmd *SettingsStreamServiceCmd) Run(ctx *context) error {
|
|||||||
return style
|
return style
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Row("Type", cmd.Type)
|
t.Row("Type", resp.StreamServiceType)
|
||||||
t.Row("Key", resp.StreamServiceSettings.Key)
|
t.Row("Key", resp.StreamServiceSettings.Key)
|
||||||
t.Row("Server", resp.StreamServiceSettings.Server)
|
t.Row("Server", resp.StreamServiceSettings.Server)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user