mirror of
https://github.com/xaionaro-go/streamctl.git
synced 2025-10-04 07:06:25 +08:00
Fix stream creation on YouTube after ab906d44e2
This commit is contained in:
@@ -143,13 +143,17 @@ func (c *YouTubeClientV3) GetBroadcasts(
|
|||||||
r := c.Service.LiveBroadcasts.List(append([]string{"id"}, parts...)).
|
r := c.Service.LiveBroadcasts.List(append([]string{"id"}, parts...)).
|
||||||
Context(ctx).Fields().
|
Context(ctx).Fields().
|
||||||
MaxResults(50) // see 'maxResults' in https://developers.google.com/youtube/v3/live/docs/liveBroadcasts/list
|
MaxResults(50) // see 'maxResults' in https://developers.google.com/youtube/v3/live/docs/liveBroadcasts/list
|
||||||
|
shouldSetMine := true
|
||||||
if t != BroadcastTypeAll {
|
if t != BroadcastTypeAll {
|
||||||
r = r.BroadcastStatus(t.String())
|
r = r.BroadcastStatus(t.String())
|
||||||
} else {
|
shouldSetMine = false
|
||||||
r = r.Mine(true)
|
|
||||||
}
|
}
|
||||||
if ids != nil {
|
if ids != nil {
|
||||||
r = r.Id(ids...)
|
r = r.Id(ids...)
|
||||||
|
shouldSetMine = false
|
||||||
|
}
|
||||||
|
if shouldSetMine {
|
||||||
|
r = r.Mine(true)
|
||||||
}
|
}
|
||||||
if pageToken != "" {
|
if pageToken != "" {
|
||||||
r = r.PageToken(pageToken)
|
r = r.PageToken(pageToken)
|
||||||
|
Reference in New Issue
Block a user