feat: Add Open in custom player to twitch.tv/<channel> link context menus (#6403)

This commit is contained in:
Brian
2025-08-23 16:39:00 -04:00
committed by GitHub
parent bc1a87a9c8
commit 5b271858ac
5 changed files with 26 additions and 6 deletions
+8 -2
View File
@@ -151,6 +151,8 @@ Split::Split(QWidget *parent)
case FromTwitchLinkOpenChannelIn::Streamlink:
this->openChannelInStreamlink(twitchChannel);
break;
case FromTwitchLinkOpenChannelIn::CustomPlayer:
this->openChannelInCustomPlayer(twitchChannel);
default:
qCWarning(chatterinoWidget)
<< "Unhandled \"FromTwitchLinkOpenChannelIn\" enum "
@@ -804,6 +806,11 @@ void Split::openChannelInStreamlink(const QString channelName)
}
}
void Split::openChannelInCustomPlayer(const QString channelName)
{
openInCustomPlayer(channelName);
}
IndirectChannel Split::getIndirectChannel()
{
return this->channel_;
@@ -1137,10 +1144,9 @@ void Split::openInStreamlink()
void Split::openWithCustomScheme()
{
auto *const channel = this->getChannel().get();
if (auto *const twitchChannel = dynamic_cast<TwitchChannel *>(channel))
{
openInCustomPlayer(twitchChannel->getName());
this->openChannelInCustomPlayer(twitchChannel->getName());
}
}