projects
/
xudocci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Store the current list of downloads.
[xudocci.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
xdcc
/
ui
/
stdin
/
CommandReader.java
diff --git
a/src/main/java/net/pterodactylus/xdcc/ui/stdin/CommandReader.java
b/src/main/java/net/pterodactylus/xdcc/ui/stdin/CommandReader.java
index
3714956
..
c78697a
100644
(file)
--- a/
src/main/java/net/pterodactylus/xdcc/ui/stdin/CommandReader.java
+++ b/
src/main/java/net/pterodactylus/xdcc/ui/stdin/CommandReader.java
@@
-96,6
+96,7
@@
public class CommandReader extends AbstractExecutionThreadService {
String lastLine = "";
String line;
final List<Result> lastResult = Lists.newArrayList();
String lastLine = "";
String line;
final List<Result> lastResult = Lists.newArrayList();
+ final List<Download> downloads = Lists.newArrayList();
final List<Connection> lastConnections = Lists.newArrayList();
while ((line = reader.readLine()) != null) {
if (line.equals("")) {
final List<Connection> lastConnections = Lists.newArrayList();
while ((line = reader.readLine()) != null) {
if (line.equals("")) {
@@
-130,7
+131,9
@@
public class CommandReader extends AbstractExecutionThreadService {
writeLine("End of Search.");
} else if (words[0].equalsIgnoreCase("dcc")) {
int counter = 0;
writeLine("End of Search.");
} else if (words[0].equalsIgnoreCase("dcc")) {
int counter = 0;
- for (Download download : FluentIterable.from(core.downloads()).toSortedList(Ordering.from(BY_NAME).compound(BY_RUNNING))) {
+ downloads.clear();
+ downloads.addAll(FluentIterable.from(core.downloads()).toSortedList(Ordering.from(BY_NAME).compound(BY_RUNNING)));
+ for (Download download : downloads) {
DccReceiver dccReceiver = download.dccReceiver();
if (dccReceiver == null) {
/* download has not even started. */
DccReceiver dccReceiver = download.dccReceiver();
if (dccReceiver == null) {
/* download has not even started. */