add private option in UI

This commit is contained in:
zzz
2012-02-18 18:50:57 +00:00
parent 295242316b
commit b47aa34d6a
2 changed files with 11 additions and 2 deletions

View File

@ -663,7 +663,9 @@ public class SnarkManager implements Snark.CompleteListener {
}
if (!TrackerClient.isValidAnnounce(info.getAnnounce())) {
if (_util.shouldUseOpenTrackers() && _util.getOpenTrackers() != null) {
if (info.isPrivate()) {
addMessage(_("ERROR - No I2P trackers in private torrent \"{0}\"", info.getName()));
} else if (_util.shouldUseOpenTrackers() && _util.getOpenTrackers() != null) {
//addMessage(_("Warning - No I2P trackers in \"{0}\", will announce to I2P open trackers and DHT only.", info.getName()));
addMessage(_("Warning - No I2P trackers in \"{0}\", will announce to I2P open trackers only.", info.getName()));
//} else if (_util.getDHT() != null) {

View File

@ -1289,7 +1289,14 @@ public class I2PSnarkServlet extends Default {
out.write("\" > " +
"<input type=\"submit\" value=\"");
out.write(_("Create torrent"));
out.write("\" name=\"foo\" ></table>\n" +
out.write("\" name=\"foo\" >\n" +
"</td></tr><tr><td>");
out.write(_("Private?"));
out.write(" </td><td> <input type=\"checkbox\" class=\"optbox\" name=\"private\" value=\"true\"");
if (req.getParameter("private") != null)
out.write(" checked");
out.write("></td></tr>" +
"</table>\n" +
"</form></div></div>");
}