Remove parse check

pull/137/head
FongMi 3 years ago
parent aa1b7ae26a
commit f46098eb5e
  1. 11
      app/src/main/java/com/fongmi/android/tv/player/parse/ParseJob.java

@ -139,7 +139,7 @@ public class ParseJob implements ParseCallback {
}
private void checkResult(Map<String, String> headers, String url, String from, boolean error) {
if (isPass(headers, url)) {
if (url.length() >= 40) {
onParseSuccess(headers, url, from);
} else if (error) {
onParseError();
@ -152,15 +152,6 @@ public class ParseJob implements ParseCallback {
else onParseSuccess(result.getHeaders(), result.getUrl(), result.getJxFrom());
}
private boolean isPass(Map<String, String> headers, String url) {
try {
int code = OkHttp.newCall(url, Headers.of(headers)).execute().code();
return code == 200 && url.length() >= 40;
} catch (Exception e) {
return false;
}
}
private void startWeb(Parse item, String webUrl) {
startWeb("", item, webUrl);
}

Loading…
Cancel
Save