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

Method getList

app/src/main/java/com/github/catvod/spider/AList.java:200–217  ·  view source on GitHub ↗
(String id, boolean filter)

Source from the content-addressed store, hash-verified

198 }
199
200 private List<Item> getList(String id, boolean filter) {
201 try {
202 String key = id.contains("/") ? id.substring(0, id.indexOf("/")) : id;
203 String path = id.contains("/") ? id.substring(id.indexOf("/")) : "";
204 Drive drive = getDrive(key);
205 path = path.startsWith(drive.getPath()) ? path : drive.getPath() + path;
206 JSONObject params = new JSONObject();
207 params.put("path", path);
208 params.put("password", drive.findPass(path));
209 String response = post(drive, drive.listApi(), params.toString());
210 List<Item> items = Item.arrayFrom(getListJson(drive.isNew(), response));
211 Iterator<Item> iterator = items.iterator();
212 if (filter) while (iterator.hasNext()) if (iterator.next().ignore(drive.isNew())) iterator.remove();
213 return items;
214 } catch (Exception e) {
215 return Collections.emptyList();
216 }
217 }
218
219 private String getListJson(boolean isNew, String response) throws JSONException {
220 if (isNew) {

Callers 2

categoryContentMethod · 0.95
detailContentMethod · 0.95

Calls 12

getDriveMethod · 0.95
getPathMethod · 0.95
findPassMethod · 0.95
postMethod · 0.95
listApiMethod · 0.95
arrayFromMethod · 0.95
getListJsonMethod · 0.95
isNewMethod · 0.95
substringMethod · 0.80
putMethod · 0.80
toStringMethod · 0.80
ignoreMethod · 0.80

Tested by

no test coverage detected