UI: Add required links when using YouTube

These links are required by Google to be shown on any API client when
using Google/YouTube API.
This commit is contained in:
jp9000 2021-08-20 06:24:00 -07:00
parent 94009535cd
commit fbbe193c59
2 changed files with 24 additions and 5 deletions

View File

@ -1252,6 +1252,12 @@
<property name="text">
<string notr="true"/>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="1">
@ -1348,8 +1354,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>820</width>
<height>677</height>
<width>601</width>
<height>602</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_21">

View File

@ -837,13 +837,13 @@ void OBSBasicSettings::UpdateServiceRecommendations()
.arg(QString::number(vbitrate));
if (abitrate) {
if (!text.isEmpty())
text += "\n";
text += "<br>";
text += ENFORCE_TEXT("MaxAudioBitrate")
.arg(QString::number(abitrate));
}
if (res_count) {
if (!text.isEmpty())
text += "\n";
text += "<br>";
obs_service_resolution best_res = {};
int best_res_pixels = 0;
@ -864,12 +864,25 @@ void OBSBasicSettings::UpdateServiceRecommendations()
}
if (fps) {
if (!text.isEmpty())
text += "\n";
text += "<br>";
text += ENFORCE_TEXT("MaxFPS").arg(QString::number(fps));
}
#undef ENFORCE_TEXT
#if YOUTUBE_ENABLED
if (IsYouTubeService(QT_TO_UTF8(ui->service->currentText()))) {
if (!text.isEmpty())
text += "<br><br>";
text += "<a href=\"https://www.youtube.com/t/terms\">"
"YouTube Terms of Service</a><br>"
"<a href=\"http://www.google.com/policies/privacy\">"
"Google Privacy Policy</a><br>"
"<a href=\"https://security.google.com/settings/security/permissions\">"
"Google Third-Party Permissions</a>";
}
#endif
ui->enforceSettingsLabel->setText(text);
}