From 8fa785862b9696bd30ce3952795c9f277f2932b3 Mon Sep 17 00:00:00 2001 From: 0xb00bface <0xboobface@gmail.com> Date: Mon, 21 Dec 2020 20:09:40 +0100 Subject: [PATCH] Fix MVLive models being detected as online while being offline --- CHANGELOG.md | 1 + common/src/main/java/ctbrec/sites/manyvids/MVLiveModel.java | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6695e6b..0c8decc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/common/src/main/java/ctbrec/sites/manyvids/MVLiveModel.java b/common/src/main/java/ctbrec/sites/manyvids/MVLiveModel.java index a84f0a0f..bd735d05 100644 --- a/common/src/main/java/ctbrec/sites/manyvids/MVLiveModel.java +++ b/common/src/main/java/ctbrec/sites/manyvids/MVLiveModel.java @@ -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; }