1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-24 08:48:51 -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();
// 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
int latestRev = Integer.parseInt(update.get("revision"));