X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fcore%2FCore.java;h=b838216860d0593ac5a8d6badf959cb63d067a33;hb=358a9a2ab0ead0cc4dd86e3b97fa387ec958ec01;hp=c9107993a2c5c41af62a9215937381d235789133;hpb=ccd98b291f132395ad87b2ff65d98d8237184be1;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index c910799..b838216 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -226,6 +226,7 @@ public class Core extends AbstractService { * The Sone to watch for updates */ public void addSone(Sone sone) { + soneCache.put(sone.getId(), sone); soneDownloader.addSone(sone); } @@ -309,8 +310,9 @@ public class Core extends AbstractService { */ public void loadSone(String requestUri) { try { - FetchResult fetchResult = freenetInterface.fetchUri(new FreenetURI(requestUri).setMetaString(new String[] { "sone.xml" })); - soneDownloader.parseSone(null, fetchResult); + FreenetURI realRequestUri = new FreenetURI(requestUri).setMetaString(new String[] { "sone.xml" }); + FetchResult fetchResult = freenetInterface.fetchUri(realRequestUri); + soneDownloader.parseSone(null, fetchResult, realRequestUri); } catch (MalformedURLException mue1) { logger.log(Level.INFO, "Could not create URI from “" + requestUri + "”.", mue1); }