Browse Source

Merged dev branch into master (while manually retaining the new connect jar).

pull/13/merge
Eric Kok 11 years ago
parent
commit
955049c205
  1. 8
      core/src/org/transdroid/core/app/settings/ApplicationSettings.java
  2. 7
      lib/src/org/transdroid/daemon/Torrent.java

8
core/src/org/transdroid/core/app/settings/ApplicationSettings.java

@ -89,13 +89,17 @@ public class ApplicationSettings {
// @formatter:off // @formatter:off
Daemon type = Daemon.fromCode(prefs.getString("server_type_" + order, null)); Daemon type = Daemon.fromCode(prefs.getString("server_type_" + order, null));
boolean ssl = prefs.getBoolean("server_sslenabled_" + order, false); boolean ssl = prefs.getBoolean("server_sslenabled_" + order, false);
String defaultPort = Integer.toString(Daemon.getDefaultPortNumber(type, ssl));
String port = prefs.getString("server_port_" + order, "");
if(port.equals(""))
port = Integer.toString(Daemon.getDefaultPortNumber(type, ssl));
return new ServerSetting(order, return new ServerSetting(order,
prefs.getString("server_name_" + order, null), type, prefs.getString("server_name_" + order, null), type,
prefs.getString("server_address_" + order, null), prefs.getString("server_address_" + order, null),
prefs.getString("server_localaddress_" + order, null), prefs.getString("server_localaddress_" + order, null),
prefs.getString("server_localnetwork_" + order, null), prefs.getString("server_localnetwork_" + order, null),
Integer.parseInt(prefs.getString("server_port_" + order, defaultPort)), Integer.parseInt(port),
ssl, ssl,
prefs.getBoolean("server_ssltrustall_" + order, false), prefs.getBoolean("server_ssltrustall_" + order, false),
prefs.getString("server_ssltrustkey_" + order, null), prefs.getString("server_ssltrustkey_" + order, null),

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

@ -142,7 +142,12 @@ public final class Torrent implements Parcelable, Comparable<Torrent> {
if (realDateDone != null) { if (realDateDone != null) {
this.dateDone = realDateDone; this.dateDone = realDateDone;
} else { } else {
if (eta == -1 || eta == -2) { if( this.partDone == 1){ //finished but no finished date set so move to bottom of list
Calendar cal = Calendar.getInstance();
cal.clear();
cal.set(1900, 12, 31);
this.dateDone = cal.getTime();
} else if (eta == -1 || eta == -2) {
this.dateDone = new Date(Long.MAX_VALUE); this.dateDone = new Date(Long.MAX_VALUE);
} else { } else {
Calendar cal = Calendar.getInstance(); Calendar cal = Calendar.getInstance();

Loading…
Cancel
Save