Fix BongaCams online check

This commit is contained in:
0xb00bface 2021-02-19 17:07:40 +01:00
parent 0f125f6e63
commit 4a595da355
1 changed files with 2 additions and 1 deletions

View File

@ -55,7 +55,7 @@ public class BongaCamsModel extends AbstractModel {
@Override
public boolean isOnline(boolean ignoreCache) throws IOException, ExecutionException, InterruptedException {
if (ignoreCache) {
String url = "https://en.bongacams.com/" + URLEncoder.encode(getDisplayName(), StandardCharsets.UTF_8.name());
String url = "https://en.bongacams.com/" + URLEncoder.encode(getName(), StandardCharsets.UTF_8.name());
Request req = new Request.Builder().url(url)
.header(USER_AGENT, Config.getInstance().getSettings().httpUserAgent)
.header(ACCEPT, "*")
@ -77,6 +77,7 @@ public class BongaCamsModel extends AbstractModel {
online = false;
}
} catch (HtmlParserException e) {
LOG.warn("Online check didn't work", e);
online = false;
}
}