X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fcore%2FSoneDownloaderImpl.java;h=91bf13b8e2a502f34a2fc4600cf949309814a83d;hp=8b257dd85bac25a65a781b60586b1adba02e41f4;hb=e82bcd0c57096e722421a263fd2e95f88974b65b;hpb=8ba1240d5e15059e7469b46163c6f640dedefabb diff --git a/src/main/java/net/pterodactylus/sone/core/SoneDownloaderImpl.java b/src/main/java/net/pterodactylus/sone/core/SoneDownloaderImpl.java index 8b257dd..91bf13b 100644 --- a/src/main/java/net/pterodactylus/sone/core/SoneDownloaderImpl.java +++ b/src/main/java/net/pterodactylus/sone/core/SoneDownloaderImpl.java @@ -55,7 +55,7 @@ public class SoneDownloaderImpl extends AbstractService implements SoneDownloade private static final int MAX_PROTOCOL_VERSION = 0; /** The core. */ - private final Core core; + private final UpdatedSoneProcessor updatedSoneProcessor; private final SoneParser soneParser; /** The Freenet interface. */ @@ -64,19 +64,10 @@ public class SoneDownloaderImpl extends AbstractService implements SoneDownloade /** The sones to update. */ private final Set sones = new HashSet(); - /** - * Creates a new Sone downloader. - * - * @param core - * The core - * @param freenetInterface - * The Freenet interface - * @param soneParser - */ @Inject - SoneDownloaderImpl(Core core, FreenetInterface freenetInterface, SoneParser soneParser) { + SoneDownloaderImpl(UpdatedSoneProcessor updatedSoneProcessor, FreenetInterface freenetInterface, SoneParser soneParser) { super("Sone Downloader", false); - this.core = core; + this.updatedSoneProcessor = updatedSoneProcessor; this.freenetInterface = freenetInterface; this.soneParser = soneParser; } @@ -170,7 +161,7 @@ public class SoneDownloaderImpl extends AbstractService implements SoneDownloade if (parsedSone != null) { if (!fetchOnly) { parsedSone.setStatus((parsedSone.getTime() == 0) ? SoneStatus.unknown : SoneStatus.idle); - core.updateSone(parsedSone); + updatedSoneProcessor.updateSone(parsedSone); addSone(parsedSone); } }