forked from hummypkg/sweeper
add now condition
This commit is contained in:
parent
92a11f1092
commit
2ec708a887
@ -1,7 +1,7 @@
|
||||
Package: sweeper
|
||||
Priority: optional
|
||||
Section: misc
|
||||
Version: 2.0.6
|
||||
Version: 2.0.7
|
||||
Architecture: mipsel
|
||||
Maintainer: af123@hummypkg.org.uk
|
||||
Depends: webif(>=1.0.15-5)
|
||||
|
@ -11,7 +11,9 @@ fi
|
||||
|
||||
[ -f /mod/.swschema ] && schema=`cat /mod/.swschema` || schema=1
|
||||
|
||||
case schema in
|
||||
echo "Current Sweeper schema: $schema"
|
||||
|
||||
case $schema in
|
||||
1)
|
||||
# Upgrade folder rules
|
||||
echo "Upgrading sweeper rules for folder series."
|
||||
|
@ -289,6 +289,11 @@ proc ::sweeper::hour {ts str folder} {
|
||||
return [::sweeper::intcomp $hour $str]
|
||||
}
|
||||
|
||||
proc ::sweeper::now {ts str folder} {
|
||||
set now [clock format [clock seconds] -format "%H%M"]
|
||||
return [::sweeper::intcomp $now $str]
|
||||
}
|
||||
|
||||
proc ::sweeper::schedduration {ts dur folder} {
|
||||
return [::sweeper::intcomp [expr [$ts get scheddur] / 60] $dur]
|
||||
}
|
||||
|
@ -49,6 +49,13 @@ var schema = {
|
||||
negate: true,
|
||||
def: "0"
|
||||
},
|
||||
now: {
|
||||
'class': 'all',
|
||||
type: 'int',
|
||||
desc: 'Current time in 24-hour format (HHMM)',
|
||||
negate: true,
|
||||
def: "0"
|
||||
},
|
||||
title: {
|
||||
'class': 'all',
|
||||
type: 'substr',
|
||||
|
Loading…
Reference in New Issue
Block a user