Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(youtube): category set as default when scheduling event #4518

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions app/services/platforms/youtube.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,14 @@ export class YoutubeService
} else {
assertIsDefined(ytSettings.broadcastId);
await this.updateBroadcast(ytSettings.broadcastId, ytSettings);

/*
* set the category, `createBroadcast` does it automatically now,
* we've moved this here until we can refactor `#updateBroadcast`
* to avoid duplicate requests
*/
await this.updateCategory(broadcast.id, ytSettings.categoryId!);

broadcast = await this.fetchBroadcast(ytSettings.broadcastId);
}

Expand All @@ -294,9 +302,6 @@ export class YoutubeService
stream = await this.fetchLiveStream(broadcast.contentDetails.boundStreamId);
}

// set the category
await this.updateCategory(broadcast.id, ytSettings.categoryId!);

// setup key and platform type in the OBS settings
const streamKey = stream.cdn.ingestionInfo.streamName;

Expand Down Expand Up @@ -513,6 +518,10 @@ export class YoutubeService
url: `${this.apiBase}/${endpoint}`,
});

if (params.categoryId) {
await this.updateCategory(broadcast.id, params.categoryId);
}

// upload thumbnail
if (params.thumbnail && params.thumbnail !== 'default') {
await this.uploadThumbnail(params.thumbnail, broadcast.id);
Expand Down