Add drmLegacy parse

pull/585/head
FongMi 11 months ago
parent 16022f8652
commit fb04e3b95f
  1. 13
      app/src/main/java/com/fongmi/android/tv/api/LiveParser.java

@ -199,6 +199,7 @@ public class LiveParser {
else if (line.startsWith("#EXTVLCOPT:http-referrer")) referer(line);
else if (line.startsWith("#KODIPROP:inputstream.adaptive.license_key")) key(line);
else if (line.startsWith("#KODIPROP:inputstream.adaptive.license_type")) type(line);
else if (line.startsWith("#KODIPROP:inputstream.adaptive.drm_legacy")) drmLegacy(line);
else if (line.startsWith("#KODIPROP:inputstream.adaptive.manifest_type")) format(line);
else if (line.startsWith("#KODIPROP:inputstream.adaptive.stream_headers")) headers(line);
}
@ -284,6 +285,18 @@ public class LiveParser {
}
}
public void drmLegacy(String line) {
try {
line = line.split("drm_legacy=")[1].trim();
type = line.split("\\|")[0].trim();
key = line.split("\\|")[1].trim();
if (!key.startsWith("http")) convert();
} catch (Exception e) {
type = null;
key = null;
}
}
private void header(String line) {
try {
if (line.contains("#EXTHTTP:")) header = Json.toMap(Json.parse(line.split("#EXTHTTP:")[1].trim()));

Loading…
Cancel
Save