* i2psnark:

- Don't send a keepalive to a peer we are going to disconnect
   - Disconnect peer when idle a long time
   - PeerCheckerTask cleanup
   - Static ref cleanup
   - Don't show a downloaded torrent file as "seeding"
   - Better torrent file download icon (from Silk, same license as the others)
This commit is contained in:
zzz
2012-07-01 16:16:08 +00:00
parent 63f22a54e1
commit 0d8bcd5dad
10 changed files with 73 additions and 44 deletions

View File

@ -243,11 +243,12 @@ public class FetchAndAdd extends Snark implements EepGet.StatusListener, Runnabl
}
/**
* @return torrent file bytes remaining or -1
* @return -1 when done so the web will list us as "complete" instead of "seeding"
*/
@Override
public long getRemainingLength() {
return _remaining;
long rv = _remaining;
return rv > 0 ? rv : -1;
}
/**

View File

@ -1073,7 +1073,7 @@ public class I2PSnarkServlet extends DefaultServlet {
else if (isValid)
icon = toIcon(meta.getName());
else if (snark instanceof FetchAndAdd)
icon = "arrow_down";
icon = "basket_put";
else
icon = "magnet";
if (isValid) {
@ -1104,7 +1104,7 @@ public class I2PSnarkServlet extends DefaultServlet {
out.write("<td align=\"right\" class=\"snarkTorrentETA " + rowClass + "\">");
if(isRunning && remainingSeconds > 0)
out.write(DataHelper.formatDuration2(remainingSeconds*1000)); // (eta 6h)
out.write(DataHelper.formatDuration2(Math.max(remainingSeconds, 10) * 1000)); // (eta 6h)
out.write("</td>\n\t");
out.write("<td align=\"right\" class=\"snarkTorrentDownloaded " + rowClass + "\">");
if (remaining > 0)