0

Merge branch 'dev'

This commit is contained in:
2016-03-30 15:55:48 +03:00
4 changed files with 164 additions and 39 deletions

View File

@@ -66,28 +66,15 @@ public class Onlinelife implements KinoWarez {
}
}
boolean has_player = is_serial(name);
name = name.replaceAll("\\[.+", "").trim();
Kino kino = new Kino(name, url, this);
kino.setPlayer(has_player);
kino.setPlayer(true);
outList.add(kino);
}
return outList;
}
private boolean is_serial(String name) {
Pattern pattern = Pattern.compile("\\[(.+)\\]");
Matcher matcher = pattern.matcher(name);
if (matcher.find()) {
int idx = matcher.group().indexOf("1");
return !(idx >= 0);
} else {
return false;
}
}
@Override
public String player(String page) {
String movie_id = page.substring(1,page.indexOf("-"));
@@ -102,7 +89,8 @@ public class Onlinelife implements KinoWarez {
if (jsonObj.has("file")) {
String fileMp4 = jsonObj.get("file").getAsString().substring("http://".length());
return "{\"file\":\"/proxy/onlinelife/" + fileMp4 + "\"}";
String title = jsonObj.get("comment").getAsString();
return "{\"file\":\"/proxy/onlinelife/" + fileMp4 + "\",\"title\":\"" + title + "\"}";
} else if (jsonObj.has("pl")) {
browser.setEncoding("utf-8");
return replaceToProxy(browser.get(jsonObj.get("pl").getAsString()));