zero-length override
Signed-off-by: Martyn Ranyard <m@rtyn.berlin>
This commit is contained in:
parent
ffec6c8260
commit
10cef66e13
|
@ -41,9 +41,13 @@ func PatternHandler(response http.ResponseWriter, request *http.Request) {
|
|||
if found {
|
||||
i, _ := strconv.ParseUint(vars["duration"], 10, 64)
|
||||
e.Duration = i
|
||||
} else {
|
||||
if vars["override"] == "true" {
|
||||
e.Duration = 0
|
||||
} else {
|
||||
e.Duration = 5000
|
||||
}
|
||||
}
|
||||
_, found = vars["speed"]
|
||||
if found {
|
||||
i, _ := strconv.Atoi(vars["speed"])
|
||||
|
@ -69,9 +73,13 @@ func ColourHandler(response http.ResponseWriter, request *http.Request) {
|
|||
if found {
|
||||
i, _ := strconv.ParseUint(vars["duration"], 10, 64)
|
||||
e.Duration = i
|
||||
} else {
|
||||
if vars["override"] == "true" {
|
||||
e.Duration = 0
|
||||
} else {
|
||||
e.Duration = 5000
|
||||
}
|
||||
}
|
||||
var c queue.RGBcolor
|
||||
for cn, cv := range colornames.Map {
|
||||
if cn == strings.ToLower(vars["name"]) {
|
||||
|
@ -99,9 +107,13 @@ func FadeHandler(response http.ResponseWriter, request *http.Request) {
|
|||
if found {
|
||||
i, _ := strconv.ParseUint(vars["duration"], 10, 64)
|
||||
e.Duration = i
|
||||
} else {
|
||||
if vars["override"] == "true" {
|
||||
e.Duration = 0
|
||||
} else {
|
||||
e.Duration = 5000
|
||||
}
|
||||
}
|
||||
var c queue.RGBcolor
|
||||
for cn, cv := range colornames.Map {
|
||||
if cn == strings.ToLower(vars["namefrom"]) {
|
||||
|
|
Loading…
Reference in New Issue