Fix live proxy

pull/183/head
FongMi 3 years ago
parent 810650c95e
commit 1fa82cb1c4
  1. 2
      app/src/main/java/com/fongmi/android/tv/api/LiveParser.java
  2. 3
      app/src/main/java/com/fongmi/android/tv/bean/Live.java

@ -29,7 +29,7 @@ public class LiveParser {
if (live.getGroups().size() > 0) return; if (live.getGroups().size() > 0) return;
if (live.getType() == 0) text(live, getText(live.getUrl())); if (live.getType() == 0) text(live, getText(live.getUrl()));
if (live.getType() == 1) json(live, getText(live.getUrl())); if (live.getType() == 1) json(live, getText(live.getUrl()));
if (live.getType() == 2) proxy(live, getText(live.getUrl())); if (live.getType() == 2) proxy(live, getText(Utils.checkProxy(live.getUrl())));
} }
public static void text(Live live, String text) { public static void text(Live live, String text) {

@ -3,7 +3,6 @@ package com.fongmi.android.tv.bean;
import android.net.Uri; import android.net.Uri;
import android.text.TextUtils; import android.text.TextUtils;
import com.fongmi.android.tv.utils.Utils;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.JsonElement; import com.google.gson.JsonElement;
import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.SerializedName;
@ -152,7 +151,7 @@ public class Live {
} }
private void setProxy() { private void setProxy() {
this.url = Utils.checkProxy(getChannels().get(0).getUrls().get(0)); this.url = getChannels().get(0).getUrls().get(0);
this.name = getChannels().get(0).getName(); this.name = getChannels().get(0).getName();
this.type = 2; this.type = 2;
} }

Loading…
Cancel
Save