mirror of
https://github.com/xaionaro-go/streamctl.git
synced 2025-10-07 16:31:02 +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()
|
value := buf.String()
|
||||||
|
if value == "" {
|
||||||
|
return result, nil
|
||||||
|
}
|
||||||
_, err = fmt.Sscanf(value, "%v", &result)
|
_, err = fmt.Sscanf(value, "%v", &result)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return result, fmt.Errorf("unable to scan value '%v' into %T: %w", value, result, err)
|
return result, fmt.Errorf("unable to scan value '%v' into %T: %w", value, result, err)
|
||||||
|
@@ -635,6 +635,9 @@ func (yt *YouTube) StartStream(
|
|||||||
templateBroadcastIDs,
|
templateBroadcastIDs,
|
||||||
customArgs,
|
customArgs,
|
||||||
)
|
)
|
||||||
|
if len(templateBroadcastIDs) == 0 {
|
||||||
|
return fmt.Errorf("no template stream is selected")
|
||||||
|
}
|
||||||
|
|
||||||
templateBroadcastIDMap := map[string]struct{}{}
|
templateBroadcastIDMap := map[string]struct{}{}
|
||||||
for _, broadcastID := range templateBroadcastIDs {
|
for _, broadcastID := range templateBroadcastIDs {
|
||||||
|
@@ -3532,6 +3532,10 @@ func (p *Panel) profileWindow(
|
|||||||
youtubeProfile.Tags = sanitizeTags(getYoutubeTags())
|
youtubeProfile.Tags = sanitizeTags(getYoutubeTags())
|
||||||
}
|
}
|
||||||
profile.PerPlatform[youtube.ID] = youtubeProfile
|
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)
|
err := commitFn(ctx, profile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Reference in New Issue
Block a user