mirror of https://github.com/zlatinb/muwire
make the download retry interval in seconds, default still 1 minute
parent
d9c1067226
commit
e09c456a13
|
@ -46,7 +46,7 @@ class MuWireSettings {
|
||||||
nickname = props.getProperty("nickname","MuWireUser")
|
nickname = props.getProperty("nickname","MuWireUser")
|
||||||
downloadLocation = new File((String)props.getProperty("downloadLocation",
|
downloadLocation = new File((String)props.getProperty("downloadLocation",
|
||||||
System.getProperty("user.home")))
|
System.getProperty("user.home")))
|
||||||
downloadRetryInterval = Integer.parseInt(props.getProperty("downloadRetryInterval","1"))
|
downloadRetryInterval = Integer.parseInt(props.getProperty("downloadRetryInterval","60"))
|
||||||
updateCheckInterval = Integer.parseInt(props.getProperty("updateCheckInterval","24"))
|
updateCheckInterval = Integer.parseInt(props.getProperty("updateCheckInterval","24"))
|
||||||
autoDownloadUpdate = Boolean.parseBoolean(props.getProperty("autoDownloadUpdate","true"))
|
autoDownloadUpdate = Boolean.parseBoolean(props.getProperty("autoDownloadUpdate","true"))
|
||||||
updateType = props.getProperty("updateType","jar")
|
updateType = props.getProperty("updateType","jar")
|
||||||
|
|
|
@ -191,7 +191,7 @@ class MainFrameModel {
|
||||||
return
|
return
|
||||||
int retryInterval = core.muOptions.downloadRetryInterval
|
int retryInterval = core.muOptions.downloadRetryInterval
|
||||||
if (retryInterval > 0) {
|
if (retryInterval > 0) {
|
||||||
retryInterval *= 60000
|
retryInterval *= 1000
|
||||||
long now = System.currentTimeMillis()
|
long now = System.currentTimeMillis()
|
||||||
if (now - lastRetryTime > retryInterval) {
|
if (now - lastRetryTime > retryInterval) {
|
||||||
lastRetryTime = now
|
lastRetryTime = now
|
||||||
|
@ -207,7 +207,7 @@ class MainFrameModel {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 60000, 60000)
|
}, 1000, 1000)
|
||||||
|
|
||||||
runInsideUIAsync {
|
runInsideUIAsync {
|
||||||
trusted.addAll(core.trustService.good.values())
|
trusted.addAll(core.trustService.good.values())
|
||||||
|
|
|
@ -71,7 +71,7 @@ class OptionsView {
|
||||||
gridBagLayout()
|
gridBagLayout()
|
||||||
label(text : "Retry failed downloads every", constraints : gbc(gridx: 0, gridy: 0))
|
label(text : "Retry failed downloads every", constraints : gbc(gridx: 0, gridy: 0))
|
||||||
retryField = textField(text : bind { model.downloadRetryInterval }, columns : 2, constraints : gbc(gridx: 1, gridy: 0))
|
retryField = textField(text : bind { model.downloadRetryInterval }, columns : 2, constraints : gbc(gridx: 1, gridy: 0))
|
||||||
label(text : "minutes", constraints : gbc(gridx : 2, gridy: 0))
|
label(text : "seconds", constraints : gbc(gridx : 2, gridy: 0))
|
||||||
|
|
||||||
label(text : "Check for updates every", constraints : gbc(gridx : 0, gridy: 1))
|
label(text : "Check for updates every", constraints : gbc(gridx : 0, gridy: 1))
|
||||||
updateField = textField(text : bind {model.updateCheckInterval }, columns : 2, constraints : gbc(gridx : 1, gridy: 1))
|
updateField = textField(text : bind {model.updateCheckInterval }, columns : 2, constraints : gbc(gridx : 1, gridy: 1))
|
||||||
|
|
Loading…
Reference in New Issue