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
+9 -1
View File
@@ -2816,13 +2816,21 @@ void ChannelView::addTwitchLinkContextMenuItems(
this->openChannelIn.invoke(twitchUsername,
FromTwitchLinkOpenChannelIn::Streamlink);
});
if (!getSettings()->customURIScheme.getValue().isEmpty())
{
menu->addAction("Open in custom &player", [twitchUsername, this] {
this->openChannelIn.invoke(
twitchUsername, FromTwitchLinkOpenChannelIn::CustomPlayer);
});
}
}
}
void ChannelView::addCommandExecutionContextMenuItems(
QMenu *menu, const MessageLayoutPtr &layout)
{
/* Get commands to be displayed in context menu;
/* Get commands to be displayed in context menu;
* only those that had the showInMsgContextMenu check box marked in the Commands page */
std::vector<Command> cmds;
for (const auto &cmd : getApp()->getCommands()->items)
+1
View File
@@ -61,6 +61,7 @@ enum class FromTwitchLinkOpenChannelIn {
Tab,
BrowserPlayer,
Streamlink,
CustomPlayer,
};
using SteadyClock = std::chrono::steady_clock;