Update tvbus

pull/586/head
FongMi 12 months ago
parent 18b3552da1
commit d06653875e
  1. BIN
      app/libs/tvbus-release.aar
  2. 6
      app/src/main/java/com/fongmi/android/tv/bean/Core.java
  3. 7
      app/src/main/java/com/fongmi/android/tv/player/extractor/TVBus.java
  4. 11
      tvbus/src/main/java/com/tvbus/engine/TVCore.java

Binary file not shown.

@ -18,6 +18,8 @@ public class Core {
private String pass;
@SerializedName("broker")
private String broker;
@SerializedName("domain")
private String domain;
@SerializedName("resp")
private String resp;
@SerializedName("sign")
@ -43,6 +45,10 @@ public class Core {
return TextUtils.isEmpty(broker) ? "" : broker;
}
public String getDomain() {
return TextUtils.isEmpty(domain) ? "" : domain;
}
public String getResp() {
return TextUtils.isEmpty(resp) ? "" : resp;
}

@ -29,10 +29,9 @@ public class TVBus implements Source.Extractor, Listener {
private void init(Core core) {
App.get().setHook(core.getHook());
tvcore = new TVCore(getPath(core.getSo()));
tvcore.auth(core.getAuth()).broker(core.getBroker());
tvcore.name(core.getName()).pass(core.getPass());
tvcore.serv(0).play(8902).mode(1).listener(this);
tvcore = new TVCore(getPath(core.getSo())).listener(this);
tvcore.auth(core.getAuth()).name(core.getName()).pass(core.getPass());
tvcore.domain(core.getDomain()).broker(core.getBroker()).serv(0).play(8902).mode(1);
tvcore.init();
}

@ -61,6 +61,15 @@ public class TVCore {
}
}
public TVCore domain(String str) {
try {
if (str.length() > 0) setDomainSuffix(handle, str);
return this;
} catch (Throwable ignored) {
return this;
}
}
public TVCore broker(String str) {
try {
if (str.length() > 0) setMKBroker(handle, str);
@ -141,6 +150,8 @@ public class TVCore {
private native void setAuthUrl(long handle, String str);
private native void setDomainSuffix(long handle, String str);
private native void setMKBroker(long handle, String str);
private native void setPassword(long handle, String str);

Loading…
Cancel
Save