Skip to content

Commit 4ab8f97

Browse files
committed
Fix stream creation on YouTube after ab906d4
1 parent 01feee5 commit 4ab8f97

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pkg/streamcontrol/youtube/youtube_client.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,17 @@ func (c *YouTubeClientV3) GetBroadcasts(
143143
r := c.Service.LiveBroadcasts.List(append([]string{"id"}, parts...)).
144144
Context(ctx).Fields().
145145
MaxResults(50) // see 'maxResults' in https://developers.google.com/youtube/v3/live/docs/liveBroadcasts/list
146+
shouldSetMine := true
146147
if t != BroadcastTypeAll {
147148
r = r.BroadcastStatus(t.String())
148-
} else {
149-
r = r.Mine(true)
149+
shouldSetMine = false
150150
}
151151
if ids != nil {
152152
r = r.Id(ids...)
153+
shouldSetMine = false
154+
}
155+
if shouldSetMine {
156+
r = r.Mine(true)
153157
}
154158
if pageToken != "" {
155159
r = r.PageToken(pageToken)

0 commit comments

Comments
 (0)