From f3f8b2d024637e16e33245e4c278af3ef4755dc6 Mon Sep 17 00:00:00 2001 From: alazymeme Date: Sat, 13 Jun 2020 03:44:05 +1000 Subject: [PATCH] Fix popout player url (#1730) * Update TwitchChannel.cpp * Reformatting forsenY * fixed other things * xd * Update TwitchChannel.cpp --- src/providers/twitch/TwitchChannel.cpp | 3 ++- src/singletons/Toasts.cpp | 4 +++- src/widgets/splits/Split.cpp | 5 +++-- src/widgets/splits/SplitHeader.cpp | 4 +++- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/providers/twitch/TwitchChannel.cpp b/src/providers/twitch/TwitchChannel.cpp index 2f24366c..6e900a7a 100644 --- a/src/providers/twitch/TwitchChannel.cpp +++ b/src/providers/twitch/TwitchChannel.cpp @@ -85,7 +85,8 @@ TwitchChannel::TwitchChannel(const QString &name, , ChannelChatters(*static_cast(this)) , subscriptionUrl_("https://www.twitch.tv/subs/" + 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) , globalBttv_(bttv) , globalFfz_(ffz) diff --git a/src/singletons/Toasts.cpp b/src/singletons/Toasts.cpp index 9316a879..1f627a22 100644 --- a/src/singletons/Toasts.cpp +++ b/src/singletons/Toasts.cpp @@ -134,7 +134,9 @@ public: case ToastReaction::OpenInPlayer: 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)); break; diff --git a/src/widgets/splits/Split.cpp b/src/widgets/splits/Split.cpp index 6ed57094..0f71f5a5 100644 --- a/src/widgets/splits/Split.cpp +++ b/src/widgets/splits/Split.cpp @@ -547,8 +547,9 @@ void Split::openBrowserPlayer() ChannelPtr channel = this->getChannel(); if (auto twitchChannel = dynamic_cast(channel.get())) { - QDesktopServices::openUrl("https://player.twitch.tv/?channel=" + - twitchChannel->getName()); + QDesktopServices::openUrl( + "https://player.twitch.tv/?parent=twitch.tv&channel=" + + twitchChannel->getName()); } } diff --git a/src/widgets/splits/SplitHeader.cpp b/src/widgets/splits/SplitHeader.cpp index d0df0b76..af57ba27 100644 --- a/src/widgets/splits/SplitHeader.cpp +++ b/src/widgets/splits/SplitHeader.cpp @@ -288,7 +288,9 @@ std::unique_ptr SplitHeader::createMainMenu() if (tc != nullptr) { 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->show(); }