forked from j62/ctbrec
1
0
Fork 0

Fix MVLive models being detected as online while being offline

This commit is contained in:
0xb00bface 2020-12-21 20:09:40 +01:00
parent 086e15578f
commit 8fa785862b
2 changed files with 6 additions and 0 deletions

View File

@ -1,6 +1,7 @@
3.10.10
========================
* Fixed MVLive recordings once again
* Fixed MVLive models being detected as online while being offline
* Fix: "Check URLs" button stays inactive after the first run
* Fix: recordings for some Cam4 models still didn't start
* Added "space used" to recordings tab

View File

@ -51,6 +51,7 @@ public class MVLiveModel extends AbstractModel {
@Override
public boolean isOnline(boolean ignoreCache) throws IOException, ExecutionException, InterruptedException {
if (ignoreCache) {
boolean modelFound = false;
MVLive site = (MVLive) getSite();
for (Model model : site.getModels()) {
if (model.getName().equalsIgnoreCase(getName()) || model.getDisplayName().equalsIgnoreCase(getName())) {
@ -58,9 +59,13 @@ public class MVLiveModel extends AbstractModel {
setName(model.getName());
setDisplayName(model.getDisplayName());
setUrl(model.getUrl());
modelFound = true;
break;
}
}
if (!modelFound) {
this.onlineState = OFFLINE;
}
}
return this.onlineState == ONLINE;
}