UI adjustments when no metainfo yet

This commit is contained in:
zzz
2010-12-20 18:55:10 +00:00
parent 7602999274
commit ebe7f3b127
4 changed files with 140 additions and 77 deletions

View File

@@ -531,6 +531,7 @@ public class Snark
// single torrent
acceptor = new ConnectionAcceptor(_util, serversocket, new PeerAcceptor(coordinator));
}
// TODO pass saved closest DHT nodes to the tracker? or direct to the coordinator?
trackerclient = new TrackerClient(_util, meta, coordinator, this);
}
@@ -781,8 +782,11 @@ public class Snark
public long getNeeded() {
if (storage != null)
return storage.needed();
// FIXME else return metainfo length if available
return -1;
if (meta != null)
// FIXME subtract chunks we have
return meta.getTotalLength();
// FIXME fake
return 16 * 16 * 1024;
}
/**