forked from j62/ctbrec
1
0
Fork 0

Fix isOnline for SHowupModel

This commit is contained in:
0xboobface 2020-05-16 21:34:39 +02:00
parent 1a5c32167e
commit 39c1fd94ba
1 changed files with 8 additions and 6 deletions

View File

@ -28,14 +28,16 @@ public class ShowupModel extends AbstractModel {
@Override @Override
public boolean isOnline(boolean ignoreCache) throws IOException, ExecutionException, InterruptedException { public boolean isOnline(boolean ignoreCache) throws IOException, ExecutionException, InterruptedException {
List<Model> modelList = getShowupSite().getModelList(); if(ignoreCache) {
for (Model model : modelList) { List<Model> modelList = getShowupSite().getModelList();
ShowupModel m = (ShowupModel) model; for (Model model : modelList) {
if (m.getUid() == uid) { ShowupModel m = (ShowupModel) model;
return m.getOnlineState(false) != State.ONLINE; if (m.getUid() == uid) {
setOnlineState(m.getOnlineState(false));
}
} }
} }
return false; return getOnlineState(false) == State.ONLINE;
} }
@Override @Override