X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fxdcc%2Fui%2Fstdin%2FRestartCommand.java;h=bd8fac8af7b49f7984403933f4737645398e524c;hb=1668dc75b65956d82ddfeb50a09ef04991996511;hp=84a7d2ec57de7971a0f1143a5cae9d9902584e95;hpb=38f71a02b5068c3a1ab349d2c9e780af155a5018;p=xudocci.git diff --git a/src/main/java/net/pterodactylus/xdcc/ui/stdin/RestartCommand.java b/src/main/java/net/pterodactylus/xdcc/ui/stdin/RestartCommand.java index 84a7d2e..bd8fac8 100644 --- a/src/main/java/net/pterodactylus/xdcc/ui/stdin/RestartCommand.java +++ b/src/main/java/net/pterodactylus/xdcc/ui/stdin/RestartCommand.java @@ -30,16 +30,16 @@ import net.pterodactylus.xdcc.data.Download; import com.google.common.primitives.Ints; /** - * TODO + * Command that can restart a failed download by rerequesting the same pack from the same bot. * * @author David ‘Bombe’ Roden */ public class RestartCommand implements Command { private final Core core; - private final DownloadFailures downloadFailures; + private final Collection downloadFailures; - public RestartCommand(Core core, DownloadFailures downloadFailures) { + public RestartCommand(Core core, Collection downloadFailures) { this.core = core; this.downloadFailures = downloadFailures; } @@ -61,7 +61,7 @@ public class RestartCommand implements Command { if ((index != null) && (index < lastFailedDownloads.size())) { Download failedDownload = lastFailedDownloads.get(index); core.fetch(failedDownload.bot(), failedDownload.pack()); - downloadFailures.removeFailedDownload(failedDownload); + downloadFailures.remove(failedDownload); } return state; }