forked from j62/ctbrec
Fix BongaCams online check
This commit is contained in:
parent
0f125f6e63
commit
4a595da355
|
@ -55,7 +55,7 @@ public class BongaCamsModel extends AbstractModel {
|
||||||
@Override
|
@Override
|
||||||
public boolean isOnline(boolean ignoreCache) throws IOException, ExecutionException, InterruptedException {
|
public boolean isOnline(boolean ignoreCache) throws IOException, ExecutionException, InterruptedException {
|
||||||
if (ignoreCache) {
|
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)
|
Request req = new Request.Builder().url(url)
|
||||||
.header(USER_AGENT, Config.getInstance().getSettings().httpUserAgent)
|
.header(USER_AGENT, Config.getInstance().getSettings().httpUserAgent)
|
||||||
.header(ACCEPT, "*")
|
.header(ACCEPT, "*")
|
||||||
|
@ -77,6 +77,7 @@ public class BongaCamsModel extends AbstractModel {
|
||||||
online = false;
|
online = false;
|
||||||
}
|
}
|
||||||
} catch (HtmlParserException e) {
|
} catch (HtmlParserException e) {
|
||||||
|
LOG.warn("Online check didn't work", e);
|
||||||
online = false;
|
online = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue