mirror of https://github.com/zlatinb/muwire
option for download attempts before giving up in plugin
parent
94dd6101aa
commit
fa53a35023
|
@ -23,6 +23,7 @@ public class ConfigurationServlet extends HttpServlet {
|
||||||
static {
|
static {
|
||||||
INPUT_VALIDATORS.put("trustListInterval", new PositiveIntegerValidator("Trust list update frequency (hours)"));
|
INPUT_VALIDATORS.put("trustListInterval", new PositiveIntegerValidator("Trust list update frequency (hours)"));
|
||||||
INPUT_VALIDATORS.put("downloadRetryInterval", new PositiveIntegerValidator("Download retry frequency (seconds)"));
|
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("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("uploadSlotsPerUser", new IntegerValidator("Upload slots per user (-1 means unlimited)"));
|
||||||
INPUT_VALIDATORS.put("downloadLocation", new DirectoryValidator());
|
INPUT_VALIDATORS.put("downloadLocation", new DirectoryValidator());
|
||||||
|
@ -92,6 +93,7 @@ public class ConfigurationServlet extends HttpServlet {
|
||||||
case "allowTrustLists": core.getMuOptions().setAllowTrustLists(true); break;
|
case "allowTrustLists": core.getMuOptions().setAllowTrustLists(true); break;
|
||||||
case "trustListInterval" : core.getMuOptions().setTrustListInterval(Integer.parseInt(value)); break;
|
case "trustListInterval" : core.getMuOptions().setTrustListInterval(Integer.parseInt(value)); break;
|
||||||
case "downloadRetryInterval" : core.getMuOptions().setDownloadRetryInterval(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 "totalUploadSlots" : core.getMuOptions().setTotalUploadSlots(Integer.parseInt(value)); break;
|
||||||
case "uploadSlotsPerUser" : core.getMuOptions().setUploadSlotsPerUser(Integer.parseInt(value)); break;
|
case "uploadSlotsPerUser" : core.getMuOptions().setUploadSlotsPerUser(Integer.parseInt(value)); break;
|
||||||
case "downloadLocation" : core.getMuOptions().setDownloadLocation(getDirectory(value)); break;
|
case "downloadLocation" : core.getMuOptions().setDownloadLocation(getDirectory(value)); break;
|
||||||
|
|
|
@ -82,6 +82,13 @@ Exception error = (Exception) application.getAttribute("MWConfigError");
|
||||||
</td>
|
</td>
|
||||||
<td><p align="right"><input type="text" size="1" name="downloadRetryInterval" class="right" value="<%= core.getMuOptions().getDownloadRetryInterval()%>"></p></td>
|
<td><p align="right"><input type="text" size="1" name="downloadRetryInterval" class="right" value="<%= core.getMuOptions().getDownloadRetryInterval()%>"></p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><div class="tooltip"><%=Util._t("Give up on sources after this many failures (-1 means never)")%>
|
||||||
|
<span class="tooltiptext"><%=Util._t("After how many download attempts MuWire should give up on the download source.")%></span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td><p align="right"><input type="text" size="1" name="downloadMaxFailures" class="right" value="<%= core.getMuOptions().getDownloadMaxFailures()%>"></p></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><div class="tooltip"><%=Util._t("Directory for downloaded files")%>
|
<td><div class="tooltip"><%=Util._t("Directory for downloaded files")%>
|
||||||
<span class="tooltiptext"><%=Util._t("Where to save downloaded files. MuWire must be able to write to this location.")%></span>
|
<span class="tooltiptext"><%=Util._t("Where to save downloaded files. MuWire must be able to write to this location.")%></span>
|
||||||
|
|
Loading…
Reference in New Issue