mirror of
https://github.com/xaionaro-go/streamctl.git
synced 2025-10-08 00:40:32 +08:00
Fix minor bugs discovered during alpha test
This commit is contained in:
@@ -24,6 +24,9 @@ func Eval[T any](
|
||||
}
|
||||
|
||||
value := buf.String()
|
||||
if value == "" {
|
||||
return result, nil
|
||||
}
|
||||
_, err = fmt.Sscanf(value, "%v", &result)
|
||||
if err != nil {
|
||||
return result, fmt.Errorf("unable to scan value '%v' into %T: %w", value, result, err)
|
||||
|
@@ -635,6 +635,9 @@ func (yt *YouTube) StartStream(
|
||||
templateBroadcastIDs,
|
||||
customArgs,
|
||||
)
|
||||
if len(templateBroadcastIDs) == 0 {
|
||||
return fmt.Errorf("no template stream is selected")
|
||||
}
|
||||
|
||||
templateBroadcastIDMap := map[string]struct{}{}
|
||||
for _, broadcastID := range templateBroadcastIDs {
|
||||
|
@@ -3532,6 +3532,10 @@ func (p *Panel) profileWindow(
|
||||
youtubeProfile.Tags = sanitizeTags(getYoutubeTags())
|
||||
}
|
||||
profile.PerPlatform[youtube.ID] = youtubeProfile
|
||||
if len(youtubeProfile.TemplateBroadcastIDs) == 0 {
|
||||
p.DisplayError(fmt.Errorf("no youtube template stream is selected"))
|
||||
return
|
||||
}
|
||||
}
|
||||
err := commitFn(ctx, profile)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user