X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fcore%2FSoneRescuer.java;h=2a1d14d2b0f1970665081602c17aa275a70cd639;hp=93c77c2b5baa29f2f42f14e4d033e2a81125c7e3;hb=HEAD;hpb=c5734598ee88c40467f586de702a67ccabd0af92 diff --git a/src/main/java/net/pterodactylus/sone/core/SoneRescuer.java b/src/main/java/net/pterodactylus/sone/core/SoneRescuer.java index 93c77c2..2a1d14d 100644 --- a/src/main/java/net/pterodactylus/sone/core/SoneRescuer.java +++ b/src/main/java/net/pterodactylus/sone/core/SoneRescuer.java @@ -1,5 +1,5 @@ /* - * Sone - SoneRescuer.java - Copyright © 2011–2019 David Roden + * Sone - SoneRescuer.java - Copyright © 2011–2020 David Roden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -114,8 +114,9 @@ public class SoneRescuer extends AbstractService { * The edition to rescue * @return This Sone rescuer */ - public void setEdition(long edition) { + public SoneRescuer setEdition(long edition) { currentEdition = edition; + return this; } /** @@ -158,7 +159,7 @@ public class SoneRescuer extends AbstractService { } if (fetching) { core.lockSone(sone); - FreenetURI soneUri = sone.getRequestUri().setKeyType("SSK").setDocName("Sone-" + getNextEdition()).setMetaString(new String[] { "sone.xml" }); + FreenetURI soneUri = sone.getRequestUri().setKeyType("SSK").setDocName("Sone-" + currentEdition).setMetaString(new String[] { "sone.xml" }); System.out.println("URI: " + soneUri); Sone fetchedSone = soneDownloader.fetchSone(sone, soneUri, true); System.out.println("Sone: " + fetchedSone);