diff --git a/webui/src/main/java/com/muwire/webui/ConfigurationServlet.java b/webui/src/main/java/com/muwire/webui/ConfigurationServlet.java index 287fff37..9f6904e0 100644 --- a/webui/src/main/java/com/muwire/webui/ConfigurationServlet.java +++ b/webui/src/main/java/com/muwire/webui/ConfigurationServlet.java @@ -23,6 +23,7 @@ public class ConfigurationServlet extends HttpServlet { static { INPUT_VALIDATORS.put("trustListInterval", new PositiveIntegerValidator("Trust list update frequency (hours)")); INPUT_VALIDATORS.put("downloadRetryInterval", new PositiveIntegerValidator("Download retry frequency (seconds)")); + INPUT_VALIDATORS.put("downloadMaxFailures", new IntegerValidator("Give up on sources after this many failures (-1 means never)")); INPUT_VALIDATORS.put("totalUploadSlots", new IntegerValidator("Total upload slots (-1 means unlimited)")); INPUT_VALIDATORS.put("uploadSlotsPerUser", new IntegerValidator("Upload slots per user (-1 means unlimited)")); INPUT_VALIDATORS.put("downloadLocation", new DirectoryValidator()); @@ -92,6 +93,7 @@ public class ConfigurationServlet extends HttpServlet { case "allowTrustLists": core.getMuOptions().setAllowTrustLists(true); break; case "trustListInterval" : core.getMuOptions().setTrustListInterval(Integer.parseInt(value)); break; case "downloadRetryInterval" : core.getMuOptions().setDownloadRetryInterval(Integer.parseInt(value)); break; + case "downloadMaxFailures" : core.getMuOptions().setDownloadMaxFailures(Integer.parseInt(value)); break; case "totalUploadSlots" : core.getMuOptions().setTotalUploadSlots(Integer.parseInt(value)); break; case "uploadSlotsPerUser" : core.getMuOptions().setUploadSlotsPerUser(Integer.parseInt(value)); break; case "downloadLocation" : core.getMuOptions().setDownloadLocation(getDirectory(value)); break; diff --git a/webui/src/main/webapp/ConfigurationPage.jsp b/webui/src/main/webapp/ConfigurationPage.jsp index 131459aa..efea36e6 100644 --- a/webui/src/main/webapp/ConfigurationPage.jsp +++ b/webui/src/main/webapp/ConfigurationPage.jsp @@ -82,6 +82,13 @@ Exception error = (Exception) application.getAttribute("MWConfigError");