Tried to reduce frequency of Twitch API pulls
This commit is contained in:
parent
967c66040c
commit
3eb312abf8
BIN
sigIRCv2.jar
BIN
sigIRCv2.jar
Binary file not shown.
@ -138,6 +138,7 @@ public class TwitchModule extends Module{
|
|||||||
lastFollowerCheck = FOLLOWERCHECKTIMER;
|
lastFollowerCheck = FOLLOWERCHECKTIMER;
|
||||||
getFollowers(false);
|
getFollowers(false);
|
||||||
popFollowerFromQueue();
|
popFollowerFromQueue();
|
||||||
|
isStreamOnline(true);
|
||||||
}
|
}
|
||||||
if (lastFollowerAnnouncement>0) {
|
if (lastFollowerAnnouncement>0) {
|
||||||
lastFollowerAnnouncement--;
|
lastFollowerAnnouncement--;
|
||||||
@ -280,8 +281,12 @@ public class TwitchModule extends Module{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isStreamOnline() {
|
private boolean isStreamOnline() {
|
||||||
|
return isStreamOnline(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isStreamOnline(boolean update) {
|
||||||
|
if (update) {
|
||||||
sigIRC.manager.streams().get(TextUtils.getActualChannelName(), new StreamResponseHandler() {
|
sigIRC.manager.streams().get(TextUtils.getActualChannelName(), new StreamResponseHandler() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -322,6 +327,9 @@ public class TwitchModule extends Module{
|
|||||||
|
|
||||||
});
|
});
|
||||||
return TwitchModule.streamOnline;
|
return TwitchModule.streamOnline;
|
||||||
|
} else {
|
||||||
|
return TwitchModule.streamOnline;
|
||||||
|
}
|
||||||
//TwitchModule.streamOnline=true;
|
//TwitchModule.streamOnline=true;
|
||||||
//return true;
|
//return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user