1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-14 21:35:03 -05:00

Fix update.xml parse issues

This commit is contained in:
Reinhard Pointner 2016-03-09 05:58:39 +00:00
parent 2ee0e3cd8d
commit 360e0b5a55

View File

@ -271,7 +271,11 @@ public class Main {
Document dom = cache.xml("update.url", s -> new URL(getApplicationProperty(s))).expire(Cache.ONE_WEEK).retry(0).get(); Document dom = cache.xml("update.url", s -> new URL(getApplicationProperty(s))).expire(Cache.ONE_WEEK).retry(0).get();
// parse update xml // parse update xml
final Map<String, String> update = streamChildren(dom.getFirstChild()).collect(toMap(n -> n.getNodeName(), n -> n.getTextContent().trim())); final Map<String, String> update = streamElements(dom.getFirstChild()).collect(toMap(n -> {
return n.getNodeName();
}, n -> {
return n.getTextContent().trim();
}));
// check if update is required // check if update is required
int latestRev = Integer.parseInt(update.get("revision")); int latestRev = Integer.parseInt(update.get("revision"));