X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fcore%2FSoneDownloaderImpl.java;h=9f0559cc84f0e85ba3b2353410af228af8bb1546;hp=d3f23ed8f155714267e3b769b5792ea91019b229;hb=4b42574c9ec4490100ac3e87b9c2f3aac965a202;hpb=534abb5d5dba7f0377856d2d067ae48538226680 diff --git a/src/main/java/net/pterodactylus/sone/core/SoneDownloaderImpl.java b/src/main/java/net/pterodactylus/sone/core/SoneDownloaderImpl.java index d3f23ed..9f0559c 100644 --- a/src/main/java/net/pterodactylus/sone/core/SoneDownloaderImpl.java +++ b/src/main/java/net/pterodactylus/sone/core/SoneDownloaderImpl.java @@ -127,7 +127,7 @@ public class SoneDownloaderImpl extends AbstractService implements SoneDownloade sone, key, newKnownGood, newSlotToo)); if (edition > sone.getLatestEdition()) { sone.setLatestEdition(edition); - new Thread(fetchSoneAction(sone), + new Thread(fetchSoneAsSskAction(sone), "Sone Downloader").start(); } } @@ -155,22 +155,8 @@ public class SoneDownloaderImpl extends AbstractService implements SoneDownloade return (currentTimeMillis() - sone.getTime()) < DAYS.toMillis(7); } - private void fetchSone(Sone sone) { - fetchSone(sone, sone.getRequestUri().sskForUSK()); - } - - /** - * Fetches the updated Sone. This method can be used to fetch a Sone from a - * specific URI. - * - * @param sone - * The Sone to fetch - * @param soneUri - * The URI to fetch the Sone from - */ - @Override - public void fetchSone(Sone sone, FreenetURI soneUri) { - fetchSone(sone, soneUri, false); + private void fetchSoneAsSsk(Sone sone) { + fetchSone(sone, sone.getRequestUri().sskForUSK(), false); } /** @@ -245,21 +231,21 @@ public class SoneDownloaderImpl extends AbstractService implements SoneDownloade } @Override - public Runnable fetchSoneWithUriAction(final Sone sone) { + public Runnable fetchSoneAsUskAction(final Sone sone) { return new Runnable() { @Override public void run() { - fetchSone(sone, sone.getRequestUri()); + fetchSone(sone, sone.getRequestUri(), false); } }; } @Override - public Runnable fetchSoneAction(final Sone sone) { + public Runnable fetchSoneAsSskAction(final Sone sone) { return new Runnable() { @Override public void run() { - fetchSone(sone); + fetchSoneAsSsk(sone); } }; }