forked from j62/ctbrec
1
0
Fork 0

Create specialized HLS downloads for server and client

This commit is contained in:
0xboobface 2019-01-18 16:32:47 +01:00
parent df47f4ba91
commit 86f086eb20
1 changed files with 21 additions and 27 deletions

View File

@ -49,8 +49,8 @@ public class LiveJasminModel extends AbstractModel {
protected void loadModelInfo() throws IOException { protected void loadModelInfo() throws IOException {
String url = "https://m.livejasmin.com/en/chat-html5/" + getName(); String url = "https://m.livejasmin.com/en/chat-html5/" + getName();
Request req = new Request.Builder().url(url) Request req = new Request.Builder().url(url).header("User-Agent",
.header("User-Agent", "Mozilla/5.0 (iPhone; CPU OS 10_14 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.1 Mobile/14E304 Safari/605.1.15") "Mozilla/5.0 (iPhone; CPU OS 10_14 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.1 Mobile/14E304 Safari/605.1.15")
.header("Accept", "application/json,*/*") .header("Accept", "application/json,*/*")
.header("Accept-Language", "en") .header("Accept-Language", "en")
.header("Referer", getSite().getBaseUrl()) .header("Referer", getSite().getBaseUrl())
@ -276,16 +276,10 @@ public class LiveJasminModel extends AbstractModel {
@Override @Override
public Download createDownload() { public Download createDownload() {
// if(Config.getInstance().getSettings().livejasminSession.isEmpty()) { if(Config.isServerMode()) {
// if(Config.isServerMode()) { return new LiveJasminHlsDownload(getSite().getHttpClient());
// return new HlsDownload(getSite().getHttpClient()); } else {
// } else { return new LiveJasminMergedHlsDownload(getSite().getHttpClient());
// return new LiveJasminMergedHlsDownload(getSite().getHttpClient()); }
// }
// } else {
// return new LiveJasminWebSocketDownload(getSite().getHttpClient());
// }
//return new LiveJasminChunkedHttpDownload(getSite().getHttpClient());
return new LiveJasminWebSocketDownload(getSite().getHttpClient());
} }
} }