Add setting to not fetch chatters for bigger streamers

Work on #57
This commit is contained in:
Rasmus Karlsson
2018-03-30 15:42:59 +02:00
committed by fourtf
parent c0a3613ae0
commit 655831d154
5 changed files with 47 additions and 2 deletions
+9
View File
@@ -59,6 +59,15 @@ TwitchChannel::TwitchChannel(const QString &channelName, Communi::IrcConnection
};
auto doRefreshChatters = [=]() {
const auto streamStatus = this->GetStreamStatus();
auto &settingManager = singletons::SettingManager::getInstance();
if (settingManager.onlyFetchChattersForSmallerStreamers) {
if (streamStatus.live && streamStatus.viewerCount > settingManager.smallStreamerLimit) {
return;
}
}
util::twitch::get("https://tmi.twitch.tv/group/user/" + this->name + "/chatters",
QThread::currentThread(), refreshChatters);
};