Browse Source

Treat torrents with unknown eta as finishing in the far future rather than the far past.

pull/11/head
Eric Kok 12 years ago
parent
commit
68cf2eb4b5
  1. 7
      lib/src/org/transdroid/daemon/Torrent.java

7
lib/src/org/transdroid/daemon/Torrent.java

@ -139,15 +139,14 @@ public final class Torrent implements Parcelable, Comparable<Torrent> { @@ -139,15 +139,14 @@ public final class Torrent implements Parcelable, Comparable<Torrent> {
if (realDateDone != null) {
this.dateDone = realDateDone;
} else {
Calendar cal = Calendar.getInstance();
if (eta == -1 || eta == -2) {
cal.clear();
cal.set(1900, 12, 31);
this.dateDone = new Date(Long.MAX_VALUE);
} else {
Calendar cal = Calendar.getInstance();
cal.add(Calendar.SECOND, eta);
}
this.dateDone = cal.getTime();
}
}
this.error = error;
}

Loading…
Cancel
Save