I2PSnark: Revert the regression, hopefully cunningly sidestepping conflicts.
This commit is contained in:
@ -186,6 +186,7 @@ public class I2PSnarkServlet extends Default {
|
||||
out.write("<div class=\"snarknavbar\"><a href=\"/i2psnark/\" title=\"");
|
||||
out.write(_("Torrents"));
|
||||
out.write("\" class=\"snarkRefresh\">");
|
||||
out.write("<img border=\"0\" src=\"/themes/snark/ubergine/images/arrow_refresh.png\"> ");
|
||||
out.write(_("I2PSnark"));
|
||||
out.write("</a>");
|
||||
} else {
|
||||
@ -288,6 +289,7 @@ public class I2PSnarkServlet extends Default {
|
||||
out.write("</th>\n<th align=\"center\">");
|
||||
out.write("<img border=\"0\" src=\"/themes/console/images/inbound.png\" title=\"");
|
||||
out.write(_("Down Rate"));
|
||||
out.write("\">");
|
||||
out.write(_("Rate"));
|
||||
out.write("</th>\n<th align=\"center\">");
|
||||
out.write("<img border=\"0\" src=\"/themes/console/images/outbound.png\" title=\"");
|
||||
@ -794,7 +796,7 @@ public class I2PSnarkServlet extends Default {
|
||||
out.write(" <a href=\"" + baseURL + "details.php?dllist=1&filelist=1&info_hash=");
|
||||
out.write(TrackerClient.urlencode(snark.meta.getInfoHash()));
|
||||
out.write("\" title=\"" + name + ' ' + _("Tracker") + "\" target=\"_blank\">");
|
||||
out.write("<img border=\"0\" src=\"/themes/snark/ubergine/images/details.png\">");
|
||||
out.write("<div class=\"infoz\"><img border=\"0\" src=\"/themes/snark/ubergine/images/details.png\"></div>");
|
||||
out.write("</a>");
|
||||
break;
|
||||
}
|
||||
@ -813,11 +815,11 @@ public class I2PSnarkServlet extends Default {
|
||||
out.write("</td>\n\t");
|
||||
out.write("<td align=\"right\" class=\"snarkTorrentUploaded " + rowClass
|
||||
+ "\">" + formatSize(uploaded) + "</td>\n\t");
|
||||
out.write("<td align=\"right\" class=\"snarkTorrentRate\">");
|
||||
out.write("<td align=\"right\" class=\"snarkTorrentRateDown\">");
|
||||
if(isRunning && remaining > 0)
|
||||
out.write(formatSize(downBps) + "ps");
|
||||
out.write("</td>\n\t");
|
||||
out.write("<td align=\"right\" class=\"snarkTorrentRate\">");
|
||||
out.write("<td align=\"right\" class=\"snarkTorrentRateUp\">");
|
||||
if(isRunning)
|
||||
out.write(formatSize(upBps) + "ps");
|
||||
out.write("</td>\n\t");
|
||||
@ -1003,7 +1005,10 @@ public class I2PSnarkServlet extends Default {
|
||||
out.write(_("Add Torrent"));
|
||||
out.write("</span><hr>\n<table border=\"0\"><tr><td>");
|
||||
out.write(_("From URL"));
|
||||
out.write(":<td><input type=\"text\" name=\"newURL\" size=\"85\" value=\"" + newURL + "\" > \n");
|
||||
out.write(":<td><input type=\"text\" name=\"newURL\" size=\"85\" value=\"" + newURL + "\"");
|
||||
out.write("title=\"");
|
||||
out.write(_("Torrent file must originate from an I2P-based tracker"));
|
||||
out.write("\"> \n");
|
||||
// not supporting from file at the moment, since the file name passed isn't always absolute (so it may not resolve)
|
||||
//out.write("From file: <input type=\"file\" name=\"newFile\" size=\"50\" value=\"" + newFile + "\" /><br>");
|
||||
out.write("<input type=\"submit\" value=\"");
|
||||
@ -1085,10 +1090,11 @@ public class I2PSnarkServlet extends Default {
|
||||
out.write("</span><hr>\n");
|
||||
out.write("<table border=\"0\"><tr><td>");
|
||||
out.write(_("Data directory"));
|
||||
out.write(": <td><input type=\"text\" size=\"50\" name=\"dataDir\" value=\"" + dataDir + "\" ");
|
||||
out.write("title=\"");
|
||||
out.write(_("Directory to store torrents and data"));
|
||||
out.write("\" disabled=\"true\" ><br><i>(");
|
||||
out.write(": <td><code>" + dataDir + "</code> (");
|
||||
// out.write(": <td><input type=\"text\" size=\"50\" name=\"dataDir\" value=\"" + dataDir + "\" ");
|
||||
// out.write("title=\"");
|
||||
// out.write(_("Directory to store torrents and data"));
|
||||
// out.write("\" disabled=\"true\" ><br><i>(");
|
||||
out.write(_("Edit i2psnark.config and restart to change"));
|
||||
out.write(")</i><br>\n");
|
||||
|
||||
@ -1356,28 +1362,25 @@ public class I2PSnarkServlet extends Default {
|
||||
title = _("Torrent") + ": " + title;
|
||||
buf.append(title);
|
||||
buf.append("</TITLE>").append(HEADER).append("<link rel=\"shortcut icon\" href=\"/themes/snark/ubergine/favicon.ico\"></HEAD><BODY>\n<center><div class=\"snarknavbar\"> <a href=\"/i2psnark/\" title=\"Torrents\"");
|
||||
buf.append(" class=\"snarkRefresh\">I2PSnark</a>").append("</div>");
|
||||
buf.append(" class=\"snarkRefresh\"><img border=\"0\" src=\"/themes/snark/ubergine/images/arrow_refresh.png\"> I2PSnark</a>").append("</div>");
|
||||
|
||||
if (parent)
|
||||
{
|
||||
buf.append("\n<br><A HREF=\"");
|
||||
// corrupts utf-8
|
||||
//buf.append(URI.encodePath(URI.addPaths(base,"../")));
|
||||
buf.append(URI.addPaths(base,"../"));
|
||||
buf.append("\"><img border=\"0\" src=\"/themes/console/images/outbound.png\"> ")
|
||||
.append(_("Up to higher level directory")).append("</A>\n");
|
||||
}
|
||||
|
||||
buf.append("</div><div class=\"page\"><div class=\"mainsection\">");
|
||||
boolean showPriority = snark != null && !snark.storage.complete();
|
||||
buf.append("</div><div class=\"page\"><div class=\"mainsection\">");
|
||||
boolean showPriority = snark != null && !snark.storage.complete();
|
||||
if (showPriority)
|
||||
buf.append("<form action=\"").append(base).append("\" method=\"POST\">\n");
|
||||
buf.append("<TABLE BORDER=0 class=\"snarkTorrents\" cellpadding=\"5px 10px\">" +
|
||||
buf.append("<TABLE BORDER=0 class=\"snarkTorrents\" cellpadding=\"5px 10px\">" +
|
||||
"<thead><tr><th>").append("<img border=\"0\" src=\"/themes/snark/ubergine/images/file.png\" title=\"").append(_("File")).append("\" alt=\"").append(_("File")).append("\"> ").append(title).append("</th><th align=\"right\">").append("<img border=\"0\" src=\"/themes/snark/ubergine/images/size.png\" title=\"").append(_("FileSize")).append("\" alt=\"").append(_("FileSize")).append("\">").append(_("Size"));
|
||||
buf.append("</th><th>").append("<img border=\"0\" src=\"/themes/snark/ubergine/images/status.png\" title=\"").append(_("Download Status")).append("\">").append(_("Status")).append("</th>");
|
||||
buf.append("</th><th class=\"headerstatus\">").append("<img border=\"0\" src=\"/themes/snark/ubergine/images/status.png\" title=\"").append(_("Download Status")).append("\">").append(_("Status")).append("</th>");
|
||||
if (showPriority)
|
||||
buf.append("<th>").append(_("Priority")).append("</th>");
|
||||
buf.append("<th class=\"headerpriority\">").append("<img border=\"0\" src=\"/themes/snark/ubergine/images/priority.png\" title=\"\">").append(_("Priority")).append("</th>");
|
||||
buf.append("</tr></thead>\n");
|
||||
buf.append("<tr><td colspan=\"4\" class=\"ParentDir\"><A HREF=\"");
|
||||
buf.append(URI.addPaths(base,"../"));
|
||||
buf.append("\"><img border=\"0\" src=\"/themes/snark/ubergine/images/up.png\"> ")
|
||||
.append(_("Up to higher level directory")).append("</A></td></tr>\n");
|
||||
|
||||
|
||||
//DateFormat dfmt=DateFormat.getDateTimeInstance(DateFormat.MEDIUM,
|
||||
// DateFormat.MEDIUM);
|
||||
boolean showSaveButton = false;
|
||||
@ -1465,7 +1468,7 @@ public class I2PSnarkServlet extends Default {
|
||||
buf.append(status);
|
||||
buf.append("</TD>");
|
||||
if (showPriority) {
|
||||
buf.append("<td>");
|
||||
buf.append("<td class=\"priority\">");
|
||||
File f = item.getFile();
|
||||
if ((!complete) && (!item.isDirectory()) && f != null) {
|
||||
int pri = snark.storage.getPriority(f.getCanonicalPath());
|
||||
@ -1482,7 +1485,7 @@ public class I2PSnarkServlet extends Default {
|
||||
buf.append("<input type=\"radio\" value=\"-9\" name=\"pri.").append(f.getCanonicalPath()).append("\" ");
|
||||
if (pri < 0)
|
||||
buf.append("checked=\"true\"");
|
||||
buf.append('>').append(_("Do not download"));
|
||||
buf.append('>').append(_("Ignore"));
|
||||
showSaveButton = true;
|
||||
}
|
||||
buf.append("</td>");
|
||||
|
Reference in New Issue
Block a user