pull/210/head
FongMi 2 years ago
parent a0d362aa41
commit e14bf6fb06
  1. 3
      app/src/main/java/com/fongmi/android/tv/api/LiveParser.java
  2. 5
      app/src/main/java/com/fongmi/android/tv/api/config/VodConfig.java

@ -2,7 +2,6 @@ package com.fongmi.android.tv.api;
import android.util.Base64;
import com.fongmi.android.tv.api.config.LiveConfig;
import com.fongmi.android.tv.bean.Channel;
import com.fongmi.android.tv.bean.ClearKey;
import com.fongmi.android.tv.bean.Drm;
@ -115,7 +114,7 @@ public class LiveParser {
private static String getText(String url) {
if (url.startsWith("file")) return Path.read(url);
if (url.startsWith("http")) return OkHttp.string(url);
if (url.endsWith(".txt") || url.endsWith(".m3u")) return getText(UrlUtil.convert(LiveConfig.getUrl(), url));
if (url.startsWith("clan")) return getText(UrlUtil.fixUrl(url));
if (url.length() > 0 && url.length() % 4 == 0) return getText(new String(Base64.decode(url, Base64.DEFAULT)));
return "";
}

@ -218,7 +218,7 @@ public class VodConfig {
if (TextUtils.isEmpty(api)) return api;
if (api.startsWith("http")) return api;
if (api.startsWith("file")) return UrlUtil.convert(api);
if (api.endsWith(".js") || api.endsWith(".py")) return parseApi(UrlUtil.convert(config.getUrl(), api));
if (api.startsWith("clan")) return parseApi(UrlUtil.fixUrl(api));
return api;
}
@ -227,8 +227,7 @@ public class VodConfig {
if (ext.startsWith("http")) return ext;
if (ext.startsWith("img+")) return Decoder.getExt(ext);
if (ext.startsWith("file")) return UrlUtil.convert(ext);
if (ext.contains("http") || ext.contains("file")) return ext;
if (ext.endsWith(".txt") || ext.endsWith(".json") || ext.endsWith(".js") || ext.endsWith(".py")) return parseExt(UrlUtil.convert(config.getUrl(), ext));
if (ext.startsWith("clan")) return parseExt(UrlUtil.fixUrl(ext));
return ext;
}

Loading…
Cancel
Save