diff --git a/source/net/filebot/web/XEM.java b/source/net/filebot/web/XEM.java index 19637a5f..b3bbbcc1 100644 --- a/source/net/filebot/web/XEM.java +++ b/source/net/filebot/web/XEM.java @@ -100,6 +100,10 @@ public enum XEM { return Optional.empty(); } + public Optional getSeries(int id) throws Exception { + return getAllNames().stream().filter(r -> id == r.getId()).findFirst(); + } + public List>> getAll(Integer id) throws Exception { Map parameters = new LinkedHashMap<>(2); parameters.put("origin", getOriginName()); @@ -117,17 +121,6 @@ public enum XEM { }).findFirst().orElse(emptyMap()); } - public Map> getSingle2(Integer id, Integer season, Integer episode) throws Exception { - Map parameters = new LinkedHashMap<>(4); - parameters.put("origin", getOriginName()); - parameters.put("id", id); - parameters.put("season", season); - parameters.put("episode", episode); - - Object response = request("single", parameters); - return (Map) getMap(response, "data"); - } - public List getAllNames() throws Exception { return getAllNames(null, null, true); }