UI: Change YouTube Broadcast Dialog title

Also uses cached username rather than making an API request.
master
derrod 2021-09-05 06:01:14 +02:00
parent 35602e3249
commit 2535414923
3 changed files with 6 additions and 14 deletions

View File

@ -1193,6 +1193,7 @@ YouTube.Auth.WaitingAuth.Title="YouTube User Authorization"
YouTube.Auth.WaitingAuth.Text="Please complete the authorization in your external browser.<br>If the external browser does not open, follow this link and complete the authorization:<br>%1"
YouTube.AuthError.Text="Failed to get channel information: %1."
YouTube.Actions.WindowTitle="YouTube Broadcast Setup - Channel: %1"
YouTube.Actions.CreateNewEvent="Create New Broadcast"
YouTube.Actions.ChooseEvent="Select Existing Broadcast"
YouTube.Actions.Title="Title*"

View File

@ -23,7 +23,7 @@
</size>
</property>
<property name="windowTitle">
<string>YouTube Actions</string>
<string>YouTube.Actions.WindowTitle</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>

View File

@ -96,19 +96,10 @@ OBSYoutubeActions::OBSYoutubeActions(QWidget *parent, Auth *auth,
Cancel();
return;
}
ChannelDescription channel;
if (!apiYouTube->GetChannelDescription(channel)) {
blog(LOG_DEBUG, "Could not get channel description.");
ShowErrorDialog(
parent,
apiYouTube->GetLastError().isEmpty()
? QTStr("YouTube.Actions.Error.General")
: QTStr("YouTube.Actions.Error.Text")
.arg(apiYouTube->GetLastError()));
Cancel();
return;
}
this->setWindowTitle(channel.title);
const char *name = config_get_string(OBSBasic::Get()->Config(),
"YouTube", "ChannelName");
this->setWindowTitle(QTStr("YouTube.Actions.WindowTitle").arg(name));
QVector<CategoryDescription> category_list;
if (!apiYouTube->GetVideoCategoriesList(category_list)) {