mirror of
https://github.com/xaionaro-go/streamctl.git
synced 2025-12-24 12:27:57 +08:00
Random fixes
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -13,3 +13,4 @@ termux-packages
|
||||
priv
|
||||
.cache
|
||||
.ccache
|
||||
/.github/copilot-instructions.md
|
||||
|
||||
2
go.mod
2
go.mod
@@ -23,7 +23,7 @@ replace github.com/wlynxg/anet => github.com/BieHDC/anet v0.0.6-0.20241226223613
|
||||
|
||||
replace github.com/nicklaw5/helix/v2 v2.30.1-0.20240715193454-0151ccccf980 => github.com/xaionaro-go/helix/v2 v2.0.0-20250309182928-f54c9d4c8a29
|
||||
|
||||
replace github.com/asticode/go-astiav v0.36.0 => github.com/xaionaro-go/astiav v0.0.0-20251114192847-048826e6dc3a
|
||||
replace github.com/asticode/go-astiav v0.36.0 => github.com/xaionaro-go/astiav v0.0.0-20251210224931-afff9c0f1cf7
|
||||
|
||||
replace github.com/bluenviron/mediacommon/v2 v2.0.1-0.20250324151931-b8ce69d15d3d => github.com/xaionaro-go/mediacommon/v2 v2.0.0-20250420012906-03d6d69ac3b7
|
||||
|
||||
|
||||
4
go.sum
4
go.sum
@@ -1132,8 +1132,8 @@ github.com/xaionaro-go/CycleTLS v0.0.0-20250923213111-aed0022ae7b5 h1:uJZoPvUCOV
|
||||
github.com/xaionaro-go/CycleTLS v0.0.0-20250923213111-aed0022ae7b5/go.mod h1:t3eZQmVI9kJUelyMthvd4kEkLxGAJucvmLCIb2pi2+A=
|
||||
github.com/xaionaro-go/androidetc v0.0.0-20250824193302-b7ecebb3b825 h1:4f2P9/JASUXx2GWhQ6wyGlwOtr+nIfM6PUq9wTHqHmM=
|
||||
github.com/xaionaro-go/androidetc v0.0.0-20250824193302-b7ecebb3b825/go.mod h1:IvRt8Hto32EGtBEf7A94HVxiYEt7hGXLWabjdnUYmAE=
|
||||
github.com/xaionaro-go/astiav v0.0.0-20251114192847-048826e6dc3a h1:oWPVw8RodzH9Bd8KhnUWcTNhL/f+ABMKKXTEI0RRYJw=
|
||||
github.com/xaionaro-go/astiav v0.0.0-20251114192847-048826e6dc3a/go.mod h1:txVrlvD3ErCtyacQ6WBMarn9+oD1V8vk33dWmVCGQhM=
|
||||
github.com/xaionaro-go/astiav v0.0.0-20251210224931-afff9c0f1cf7 h1:82uBxJBN54u1WIESVEq2dihwZzM2anKvigElxXLNANA=
|
||||
github.com/xaionaro-go/astiav v0.0.0-20251210224931-afff9c0f1cf7/go.mod h1:txVrlvD3ErCtyacQ6WBMarn9+oD1V8vk33dWmVCGQhM=
|
||||
github.com/xaionaro-go/audio v0.0.0-20250426140416-6a9b3f1c8737 h1:82T1ghLMySGzft1c11Go+GtSQI67Ixk6Mq+nZ52CnnI=
|
||||
github.com/xaionaro-go/audio v0.0.0-20250426140416-6a9b3f1c8737/go.mod h1:m1JTs/Kqw+iPlQ081sfXA2JPBIylezwe5c3w//oV3Gs=
|
||||
github.com/xaionaro-go/avcommon v0.0.0-20250823173020-6a2bb1e1f59d h1:++uR850Cqo5qXGTfAq60p2sIfq7oSYK0x0KoKL8B9Ts=
|
||||
|
||||
@@ -223,7 +223,7 @@ func (k *Kick) getAccessTokenNoLock(
|
||||
if len(oauthPorts) < 2 {
|
||||
// we require two ports, because the first port is used by Twitch
|
||||
// TODO: remove all this ugly hardcodes
|
||||
return fmt.Errorf("the function GetOAuthListenPorts returned less than 2 ports (%d)", len(oauthPorts))
|
||||
return fmt.Errorf("the function GetOAuthListenPorts returned less than 2 ports (%d: %v)", len(oauthPorts), oauthPorts)
|
||||
}
|
||||
|
||||
listenPort := oauthPorts[1] // TODO: remove this hardcode [1]; it currently exists to use the different port from what we use for Twitch authentication
|
||||
|
||||
@@ -863,7 +863,9 @@ func (c *Client) UpdateStream(
|
||||
func (c *Client) SubscribeToOAuthURLs(
|
||||
ctx context.Context,
|
||||
listenPort uint16,
|
||||
) (<-chan *streamd_grpc.OAuthRequest, error) {
|
||||
) (_ret <-chan *streamd_grpc.OAuthRequest, _err error) {
|
||||
logger.Tracef(ctx, "SubscribeToOAuthURLs(ctx, %d)", listenPort)
|
||||
defer func() { logger.Tracef(ctx, "/SubscribeToOAuthURLs(ctx, %d): %v", listenPort, _err) }()
|
||||
return unwrapStreamDChan(
|
||||
ctx,
|
||||
c,
|
||||
|
||||
@@ -17,7 +17,7 @@ func (p *Panel) generateNewTitle(
|
||||
logger.Debugf(ctx, "tags == %s", tagsString)
|
||||
|
||||
// the prompt is developed by noguri
|
||||
t, err := p.generateAlternativeTextFor(ctx, fmt.Sprintf(`Based on my keywords, generate one short YouTube title for a stream.
|
||||
t, err := p.generateAlternativeTextFor(ctx, fmt.Sprintf(`Based on my keywords, generate one short YouTube single-line title for a stream.
|
||||
|
||||
Start with a red dot emoji (🔴).
|
||||
|
||||
@@ -34,6 +34,8 @@ My keywords: %s`, tagsString))
|
||||
p.DisplayError(err)
|
||||
return
|
||||
}
|
||||
t = strings.ReplaceAll(t, "\n", " | ")
|
||||
t = strings.Join(strings.Fields(t), " ") // multi-spaces -> single-spaces
|
||||
p.streamTitleField.SetText(t)
|
||||
p.streamTitleLabel.SetText(t)
|
||||
}
|
||||
|
||||
@@ -1041,6 +1041,10 @@ func (p *StreamPlayerHandler) controllerLoop(
|
||||
(p.Config.CatchupAtMaxLag-p.CurrentJitterBufDuration+time.Millisecond).Seconds()
|
||||
|
||||
setSpeed := p.WantSpeedAverage.Update(wantSpeed)
|
||||
logger.Logf(ctx, traceLogLevel,
|
||||
"StreamPlayer[%s].controllerLoop: optimal speed %f (wantSpeed == %f)",
|
||||
p.StreamID, setSpeed, wantSpeed,
|
||||
)
|
||||
setSpeed = float64(uint(setSpeed*200)) / 200 // to avoid flickering (for example between 1.0001 and 1.0000)
|
||||
|
||||
if setSpeed > p.Config.CatchupMaxSpeedFactor {
|
||||
|
||||
Reference in New Issue
Block a user