|
@@ -283,36 +283,21 @@ void OBSBasicSettings::UpdateKeyLink()
|
|
|
QString serviceName = ui->service->currentText();
|
|
|
QString customServer = ui->customServer->text().trimmed();
|
|
|
QString streamKeyLink;
|
|
|
- if (serviceName == "Twitch") {
|
|
|
- streamKeyLink = "https://dashboard.twitch.tv/settings/stream";
|
|
|
- } else if (serviceName.startsWith("YouTube")) {
|
|
|
- streamKeyLink = "https://www.youtube.com/live_dashboard";
|
|
|
- } else if (serviceName.startsWith("Restream.io")) {
|
|
|
- streamKeyLink =
|
|
|
- "https://restream.io/settings/streaming-setup?from=OBS";
|
|
|
- } else if (serviceName == "Luzento.com - RTMP") {
|
|
|
- streamKeyLink =
|
|
|
- "https://cms.luzento.com/dashboard/stream-key?from=OBS";
|
|
|
- } else if (serviceName == "Facebook Live" ||
|
|
|
- (customServer.contains("fbcdn.net") && IsCustomService())) {
|
|
|
+
|
|
|
+ obs_properties_t *props = obs_get_service_properties("rtmp_common");
|
|
|
+ obs_property_t *services = obs_properties_get(props, "service");
|
|
|
+
|
|
|
+ OBSData settings = obs_data_create();
|
|
|
+ obs_data_release(settings);
|
|
|
+
|
|
|
+ obs_data_set_string(settings, "service", QT_TO_UTF8(serviceName));
|
|
|
+ obs_property_modified(services, settings);
|
|
|
+
|
|
|
+ streamKeyLink = obs_data_get_string(settings, "stream_key_link");
|
|
|
+
|
|
|
+ if (customServer.contains("fbcdn.net") && IsCustomService()) {
|
|
|
streamKeyLink =
|
|
|
"https://www.facebook.com/live/producer?ref=OBS";
|
|
|
- } else if (serviceName.startsWith("Twitter")) {
|
|
|
- streamKeyLink = "https://studio.twitter.com/producer/sources";
|
|
|
- } else if (serviceName.startsWith("YouStreamer")) {
|
|
|
- streamKeyLink = "https://app.youstreamer.com/stream/";
|
|
|
- } else if (serviceName == "Trovo") {
|
|
|
- streamKeyLink = "https://studio.trovo.live/mychannel/stream";
|
|
|
- } else if (serviceName == "Glimesh") {
|
|
|
- streamKeyLink = "https://glimesh.tv/users/settings/stream";
|
|
|
- } else if (serviceName.startsWith("OPENREC.tv")) {
|
|
|
- streamKeyLink =
|
|
|
- "https://www.openrec.tv/login?keep_login=true&url=https://www.openrec.tv/dashboard/live?from=obs";
|
|
|
- } else if (serviceName == "Brime Live") {
|
|
|
- streamKeyLink = "https://brimelive.com/obs-stream-key-link";
|
|
|
- } else if (serviceName == "Bilibili Live") {
|
|
|
- streamKeyLink =
|
|
|
- "https://link.bilibili.com/p/center/index#/my-room/start-live";
|
|
|
}
|
|
|
|
|
|
if (serviceName == "Dacast") {
|
|
@@ -323,12 +308,14 @@ void OBSBasicSettings::UpdateKeyLink()
|
|
|
QTStr("Basic.AutoConfig.StreamPage.StreamKey"));
|
|
|
}
|
|
|
|
|
|
- if (QString(streamKeyLink).isNull()) {
|
|
|
+ if (QString(streamKeyLink).isNull() ||
|
|
|
+ QString(streamKeyLink).isEmpty()) {
|
|
|
ui->getStreamKeyButton->hide();
|
|
|
} else {
|
|
|
ui->getStreamKeyButton->setTargetUrl(QUrl(streamKeyLink));
|
|
|
ui->getStreamKeyButton->show();
|
|
|
}
|
|
|
+ obs_properties_destroy(props);
|
|
|
}
|
|
|
|
|
|
void OBSBasicSettings::LoadServices(bool showAll)
|