mirror of
https://github.com/Aitum/obs-aitum-multistream.git
synced 2024-11-22 02:12:40 +01:00
Add twitch url check
This commit is contained in:
parent
754c82e5ee
commit
e164453417
@ -67,6 +67,7 @@ bool obs_module_load(void)
|
||||
|
||||
void obs_module_post_load()
|
||||
{
|
||||
if (multistream_dock)
|
||||
multistream_dock->LoadVerticalOutputs(true);
|
||||
}
|
||||
|
||||
@ -106,9 +107,11 @@ void RemoveWidget(QWidget *widget)
|
||||
}
|
||||
|
||||
// Platform icons deciphered from endpoints
|
||||
QIcon MultistreamDock::getPlatformFromEndpoint(QString endpoint) {
|
||||
QIcon MultistreamDock::getPlatformFromEndpoint(QString endpoint)
|
||||
{
|
||||
|
||||
if (endpoint.contains(QString::fromUtf8(".contribute.live-video.net"))) { // twitch
|
||||
if (endpoint.contains(QString::fromUtf8(".contribute.live-video.net")) ||
|
||||
endpoint.contains(QString::fromUtf8(".twitch.tv"))) { // twitch
|
||||
return platformIconTwitch;
|
||||
} else if (endpoint.contains(QString::fromUtf8(".youtube.com"))) { // youtube
|
||||
return platformIconYouTube;
|
||||
@ -118,14 +121,13 @@ QIcon MultistreamDock::getPlatformFromEndpoint(QString endpoint) {
|
||||
return platformIconTikTok;
|
||||
} else if (endpoint.contains(QString::fromUtf8(".pscp.tv"))) { // twitter
|
||||
return platformIconTwitter;
|
||||
} else if (endpoint.contains(QString::fromUtf8("livepush.trovo.live/live"))) { // trovo
|
||||
} else if (endpoint.contains(QString::fromUtf8("livepush.trovo.live"))) { // trovo
|
||||
return platformIconTrovo;
|
||||
} else if (endpoint.contains(QString::fromUtf8(".facebook.com"))) { // facebook
|
||||
return platformIconFacebook;
|
||||
} else { // unknown
|
||||
return platformIconUnknown;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Output button styling
|
||||
@ -147,7 +149,6 @@ auto outputTitleStyle = QString("QLabel{}"); // "Built -in str
|
||||
auto outputGroupStyle = QString("background-color: %1; padding: 0px;")
|
||||
.arg(QPalette().color(QPalette::ColorRole::Mid).name(QColor::HexRgb)); // wrapper around above
|
||||
|
||||
|
||||
// For showing warning for no vertical integration
|
||||
void showVerticalWarning(QVBoxLayout *verticalLayout)
|
||||
{
|
||||
@ -553,7 +554,6 @@ void MultistreamDock::LoadOutput(obs_data_t *data, bool vertical)
|
||||
|
||||
auto l2 = new QHBoxLayout;
|
||||
|
||||
|
||||
auto platformIconLabel = new QLabel;
|
||||
auto platformIcon = getPlatformFromEndpoint(endpoint);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user