Fix popout player url (#1730)
* Update TwitchChannel.cpp * Reformatting forsenY * fixed other things * xd * Update TwitchChannel.cpp
This commit is contained in:
@@ -85,7 +85,8 @@ TwitchChannel::TwitchChannel(const QString &name,
|
|||||||
, ChannelChatters(*static_cast<Channel *>(this))
|
, ChannelChatters(*static_cast<Channel *>(this))
|
||||||
, subscriptionUrl_("https://www.twitch.tv/subs/" + name)
|
, subscriptionUrl_("https://www.twitch.tv/subs/" + name)
|
||||||
, channelUrl_("https://twitch.tv/" + name)
|
, channelUrl_("https://twitch.tv/" + name)
|
||||||
, popoutPlayerUrl_("https://player.twitch.tv/?channel=" + name)
|
, popoutPlayerUrl_("https://player.twitch.tv/?parent=twitch.tv&channel=" +
|
||||||
|
name)
|
||||||
, globalTwitchBadges_(globalTwitchBadges)
|
, globalTwitchBadges_(globalTwitchBadges)
|
||||||
, globalBttv_(bttv)
|
, globalBttv_(bttv)
|
||||||
, globalFfz_(ffz)
|
, globalFfz_(ffz)
|
||||||
|
|||||||
@@ -134,7 +134,9 @@ public:
|
|||||||
case ToastReaction::OpenInPlayer:
|
case ToastReaction::OpenInPlayer:
|
||||||
if (platform_ == Platform::Twitch)
|
if (platform_ == Platform::Twitch)
|
||||||
{
|
{
|
||||||
link = "https://player.twitch.tv/?channel=" + channelName_;
|
link =
|
||||||
|
"https://player.twitch.tv/?parent=twitch.tv&channel=" +
|
||||||
|
channelName_;
|
||||||
}
|
}
|
||||||
QDesktopServices::openUrl(QUrl(link));
|
QDesktopServices::openUrl(QUrl(link));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -547,8 +547,9 @@ void Split::openBrowserPlayer()
|
|||||||
ChannelPtr channel = this->getChannel();
|
ChannelPtr channel = this->getChannel();
|
||||||
if (auto twitchChannel = dynamic_cast<TwitchChannel *>(channel.get()))
|
if (auto twitchChannel = dynamic_cast<TwitchChannel *>(channel.get()))
|
||||||
{
|
{
|
||||||
QDesktopServices::openUrl("https://player.twitch.tv/?channel=" +
|
QDesktopServices::openUrl(
|
||||||
twitchChannel->getName());
|
"https://player.twitch.tv/?parent=twitch.tv&channel=" +
|
||||||
|
twitchChannel->getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -288,7 +288,9 @@ std::unique_ptr<QMenu> SplitHeader::createMainMenu()
|
|||||||
if (tc != nullptr)
|
if (tc != nullptr)
|
||||||
{
|
{
|
||||||
StreamView *view = new StreamView(
|
StreamView *view = new StreamView(
|
||||||
_channel, "https://player.twitch.tv/?channel=" + tc->name);
|
_channel,
|
||||||
|
"https://player.twitch.tv/?parent=twitch.tv&channel=" +
|
||||||
|
tc->name);
|
||||||
view->setAttribute(Qt::WA_DeleteOnClose, true);
|
view->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||||
view->show();
|
view->show();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user