forked from j62/ctbrec
Add more logging to Cam4Model
This commit is contained in:
parent
3b8022df87
commit
6875de9b14
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue