forked from hummypkg/webif
Sanity check Recording start/end fields
This commit is contained in:
parent
90b69d0d21
commit
9c5b1a5641
@ -61,6 +61,10 @@ proc ::expire::directory {dir} {
|
||||
}
|
||||
if {$ax(days) > 0} {
|
||||
# Calculate age in days
|
||||
if {[$getter $ts] < [$ts get start]} {
|
||||
log " End before start, skipping."
|
||||
continue
|
||||
}
|
||||
set age $(($now - [$getter $ts]) / 86400.0)
|
||||
log " $age days (cf. $ax(days))"
|
||||
if {$age < $ax(days)} {
|
||||
|
@ -49,7 +49,7 @@ ts method dir {} {
|
||||
}
|
||||
|
||||
ts method duration {{raw 0}} {
|
||||
set d [expr {$end - $start}]
|
||||
set d $(($end && $start && $end > $start) ? $end - $start : 0)
|
||||
if {!$raw} { set d $($d / 60) }
|
||||
return $d
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user