Implement Helix Search Categories end-point & update /setgame (#2609)

Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
Yoitsu
2021-04-11 02:34:27 +03:00
committed by GitHub
parent 00ccdbc781
commit a448af5f57
5 changed files with 54 additions and 5 deletions
@@ -687,15 +687,15 @@ void CommandController::initialize(Settings &, Paths &paths)
}
if (auto twitchChannel = dynamic_cast<TwitchChannel *>(channel.get()))
{
getHelix()->fetchGames(
QStringList(), {words.mid(1).join(" ")},
getHelix()->searchGames(
words.mid(1).join(" "),
[channel, twitchChannel](std::vector<HelixGame> games) {
if (games.size() == 0)
if (games.empty())
{
channel->addMessage(
makeSystemMessage("Game not found."));
}
else // 0 or 1 games
else // 1 or more games
{
auto status = twitchChannel->accessStreamStatus();
getHelix()->updateChannel(