forked from I2P_Developers/i2p.i2p
* 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:
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user