Fix stream creation on YouTube after ab906d44e2
Some checks failed
rolling-release / build (push) Has been cancelled
rolling-release / rolling-release (push) Has been cancelled

This commit is contained in:
Dmitrii Okunev
2025-06-29 23:02:49 +01:00
parent 01feee509a
commit 4ab8f97bfe

View File

@@ -143,13 +143,17 @@ func (c *YouTubeClientV3) GetBroadcasts(
r := c.Service.LiveBroadcasts.List(append([]string{"id"}, parts...)).
Context(ctx).Fields().
MaxResults(50) // see 'maxResults' in https://developers.google.com/youtube/v3/live/docs/liveBroadcasts/list
shouldSetMine := true
if t != BroadcastTypeAll {
r = r.BroadcastStatus(t.String())
} else {
r = r.Mine(true)
shouldSetMine = false
}
if ids != nil {
r = r.Id(ids...)
shouldSetMine = false
}
if shouldSetMine {
r = r.Mine(true)
}
if pageToken != "" {
r = r.PageToken(pageToken)