diff --git a/CONTROL/control b/CONTROL/control index e717920f..8e0265e1 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: webif Priority: optional Section: web -Version: 1.3.4-2 +Version: 1.3.4-3 Architecture: mipsel Maintainer: af123@hpkg.tv Depends: tcpfix,webif-channelicons(>=1.1.24),lighttpd(>=1.4.39-1),jim(>=0.77),jim-oo(>=0.77),jim-sqlite3(>=0.76),jim-cgi(>=0.7-1),jim-binary(>=0.76),service-control(>=2.3),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.2.3),hmt(>=2.0.10),ssmtp,cron-daemon(>=1.18.3-3),at(>=3.1.18),anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.1.9),webif-charts(>=1.2-1),stripts(>=1.2.5-3),tmenu(>=1.08),ffmpeg,id3v2,multienv(>=1.6),tcpping(>=1.1),e2fsprogs,wireless-tools(>=29-1),dbupdate,recmon(>=2.0.7),hwctl,nugget(>=0.95),sqlite3(>=3.15.1) diff --git a/webif/html/settings/modules/auto/init.hook b/webif/html/settings/modules/auto/init.hook index 24185417..eefc3d0c 100644 --- a/webif/html/settings/modules/auto/init.hook +++ b/webif/html/settings/modules/auto/init.hook @@ -10,6 +10,6 @@ handle_int_update autolog $autolog "Auto-processing log level" handle_int_update noautorec $noautorec "Auto-processing during recording" handle_int_update noautorecimm $noautorecimm "Auto-processing before recording" handle_int_update autorecperiod $autorecperiod \ - "Auto-processing recording wait period" + "Auto-processing recording wait period" 1 1 $(60 * 24) handle_str_update noautohours $noautohours "Auto processing hours" ascii diff --git a/webif/html/settings/modules/auto/settings.hook b/webif/html/settings/modules/auto/settings.hook index ea0e0b99..c2d6059d 100755 --- a/webif/html/settings/modules/auto/settings.hook +++ b/webif/html/settings/modules/auto/settings.hook @@ -43,7 +43,8 @@ setting_toggle "Suspend automatic processing whilst recording?" \ setting_toggle "Suspend automatic processing if will record soon?" \ "noautorecimm" $noautorecimm -setting_number autorecperiod "...how many minutes is soon?" $autorecperiod +setting_number autorecperiod "...how many minutes is soon?" $autorecperiod \ + 1 $(60 * 24) puts -nonewline " diff --git a/webif/html/settings/settings.jim b/webif/html/settings/settings.jim index 7148416c..30e55e64 100755 --- a/webif/html/settings/settings.jim +++ b/webif/html/settings/settings.jim @@ -13,7 +13,7 @@ set modules {general auto tvdb web epg network advanced} set settings [settings new] if {![dict exists $env SCRIPT_NAME]} { set env(SCRIPT_NAME) "" } -proc _handle_update {class var old text {trim 1}} { +proc _handle_update {class var old text {trim 1} {min ""} {max ""}} { global _cgi global settings @@ -25,6 +25,14 @@ proc _handle_update {class var old text {trim 1}} { if {$new == $old} { puts "$text unchanged." } elseif {[string is $class -strict $new]} { + if {$class == "digit" && $min ne "" && $new < $min} { + puts "Invalid value for $var (too small)." + exit + } + if {$class == "digit" && $max ne "" && $new > $max} { + puts "Invalid value for $var (too large)." + exit + } $settings $var $new puts "$text updated." } else { @@ -34,8 +42,8 @@ proc _handle_update {class var old text {trim 1}} { } } -proc handle_int_update {var old {text "Value"} {trim 1}} { - _handle_update digit $var $old $text $trim +proc handle_int_update {var old {text "Value"} {trim 1} {min ""} {max ""}} { + _handle_update digit $var $old $text $trim $min $max } proc handle_str_update {var old {text "Value"} {class alnum} {trim 1}} { @@ -86,7 +94,7 @@ proc setting_toggle {name attr checked {invert 0} {val 0}} { " } -proc setting_number {name descr val} { +proc setting_number {name descr val {min ""} {max ""}} { puts -nonewline "
@@ -94,7 +102,14 @@ proc setting_number {name descr val} { + maxlength=10" + if {$min ne ""} { + puts -nonewline " min=$min" + } + if {$max ne ""} { + puts -nonewline " max=$max" + } + puts -nonewline " value=\"$val\">