forked from j62/ctbrec
1
0
Fork 0

Add more logging to Cam4Model

This commit is contained in:
0xb00bface 2020-12-20 20:46:01 +01:00
parent 3b8022df87
commit 6875de9b14
1 changed files with 3 additions and 1 deletions

View File

@ -53,7 +53,7 @@ public class Cam4Model extends AbstractModel {
if (ignoreCache || onlineState == UNKNOWN) { if (ignoreCache || onlineState == UNKNOWN) {
try { try {
loadModelDetails(); loadModelDetails();
getPlaylistUrl(); LOG.info("Final playlist URL for {} {}", getName(), getPlaylistUrl());
} catch (Exception e) { } catch (Exception e) {
onlineState = OFFLINE; onlineState = OFFLINE;
} }
@ -123,6 +123,7 @@ public class Cam4Model extends AbstractModel {
if (m.find()) { if (m.find()) {
playlistUrl = m.group(1); playlistUrl = m.group(1);
} else { } else {
LOG.debug("hlsURl not in page");
getPlaylistUrlFromStreamUrl(); getPlaylistUrlFromStreamUrl();
} }
if (playlistUrl == null) { if (playlistUrl == null) {
@ -134,6 +135,7 @@ public class Cam4Model extends AbstractModel {
private void getPlaylistUrlFromStreamUrl() throws IOException { private void getPlaylistUrlFromStreamUrl() throws IOException {
String url = getSite().getBaseUrl() + "/_profile/streamURL?username=" + getName(); String url = getSite().getBaseUrl() + "/_profile/streamURL?username=" + getName();
LOG.debug("Getting playlist url from {}", url);
Request req = new Request.Builder() // @formatter:off Request req = new Request.Builder() // @formatter:off
.url(url) .url(url)
.header(USER_AGENT, Config.getInstance().getSettings().httpUserAgent) .header(USER_AGENT, Config.getInstance().getSettings().httpUserAgent)