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