MCPcopy Create free account
hub / github.com/FongMi/CatVodSpider / detectSub

Method detectSub

app/src/main/java/com/github/catvod/spider/Push.java:75–80  ·  view source on GitHub ↗
(String url, String ext, List<Sub> subs)

Source from the content-addressed store, hash-verified

73 }
74
75 private void detectSub(String url, String ext, List<Sub> subs) {
76 url = Util.removeExt(url).concat(".").concat(ext);
77 if (OkHttp.string(url).length() < 100) return;
78 String name = Uri.parse(url).getLastPathSegment();
79 subs.add(Sub.create().name(name).ext(ext).url(url));
80 }
81
82 private void setFileSub(String url, List<Sub> subs) {
83 File file = new File(url.replace("file://", ""));

Callers 1

setHttpSubMethod · 0.95

Calls 7

removeExtMethod · 0.95
stringMethod · 0.95
createMethod · 0.95
extMethod · 0.80
parseMethod · 0.45
urlMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected