From c3d360fa638d985697a3b81c9e10ec9e913ea5ec Mon Sep 17 00:00:00 2001 From: MymsMan Date: Sun, 26 Jul 2020 17:23:21 +0100 Subject: [PATCH 1/5] Rotate auto.log to auto_.log when it excedes settings logsize --- webif/lib/auto/util.jim | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/webif/lib/auto/util.jim b/webif/lib/auto/util.jim index 82754d6..30681d2 100644 --- a/webif/lib/auto/util.jim +++ b/webif/lib/auto/util.jim @@ -5,12 +5,13 @@ set ::auto::logprefix "" set ::auto::loglevel 1 proc ::auto::loginit {} { - + variable settings + set logsize [$settings logsize] # Rotate log file if large enough. if {[file exists $::auto::logfile] && - [file size $::auto::logfile] > 2097152} { - file copy -force $::auto::logfile "/mod/tmp/auto_old.log" - file delete $::auto::logfile + [file size $::auto::logfile] > $logsize} { + set tstamp [clock format [clock seconds] -format {%Y%m%d%H%M%S}] + file rename -force $::auto::logfile "/mod/tmp/auto.$tstamp.log" } # Open log file From 2884a82dbfa770b6361efb9a4de0f5c1729ecf45 Mon Sep 17 00:00:00 2001 From: MymsMan Date: Fri, 26 Jun 2020 20:08:21 +0100 Subject: [PATCH 2/5] Schedule all epsiodes of series --- webif/lib/rsv.class | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/webif/lib/rsv.class b/webif/lib/rsv.class index 77ec7bd..f920c44 100644 --- a/webif/lib/rsv.class +++ b/webif/lib/rsv.class @@ -967,19 +967,29 @@ proc {rsv construct} {event type} { set args(szFPBRecPath) "$args(szevtname)" set events {} set seen {} + set now [clock seconds] set progs [lmap i [\ epg dbfetch dump -scrid [$event get series_crid] \ -sort start] { if {[set ecrid [$i get event_crid]] eq ""} continue - if {$ecrid in $seen} continue - lappend seen $ecrid - if {[$i get start] < [$event get start]} { + + if {[$i end] < $now} { set args(usLastRecordedEvtId) [$i get event_id] continue } + if {$ecrid in $seen} continue + lappend seen $ecrid lappend events [rsv mkaul $i] list "1$::ccrid$ecrid" }] + # set 1st event to record + binary scan [string range [lindex $events 0] 0 15] \ + iiii service_id start end event_id + #puts "$service_id $start [clock format $end] $event_id" + set args(hsvc) $service_id + set args(nsttime) $start + set args(usevtid) $event_id + set args(nduration) $($end-$start) set args(szEventToRecord) "[join $progs "|"]|" set args(aulEventToRecordInfo) [join $events ""] } From 3623a26a080f635269ea64538ddc136316249814 Mon Sep 17 00:00:00 2001 From: df Date: Tue, 14 Jul 2020 10:12:57 +0000 Subject: [PATCH 3/5] Correct autolast in the future Fixing issue in . --- webif/lib/auto/scan | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webif/lib/auto/scan b/webif/lib/auto/scan index 05fea36..3926ad6 100755 --- a/webif/lib/auto/scan +++ b/webif/lib/auto/scan @@ -73,7 +73,10 @@ if {!$::auto::force} { set timesincelast $(([clock seconds] - [$::auto::settings autolast]) \ / 60) - if {$timesincelast < $autofreq} { + if {$timesincelast < 0} { + # time machine issue: correct it + $::auto::settings autolast 0 + } elseif {$timesincelast < $autofreq} { ::auto::log "Aborting, not yet time to run." 2 ::auto::log " elapsed (minutes): $timesincelast (<$autofreq)" 2 exit From 1a25e2a3f14fce0c9c13ce26bab85e2cca170133 Mon Sep 17 00:00:00 2001 From: df Date: Tue, 30 Jun 2020 03:33:38 +0000 Subject: [PATCH 4/5] Fix potential format error with queue item containing % If an item is in the queue whose file name contains a %, the following error occurs, causing the item never to be dequeued: ```in procedure '::auto::dumpq' called at file "/mod/webif/lib/auto/deq", line 167 at file "/mod/webif/lib/auto/deq", line 118 /mod/webif/lib/auto/deq:118: Error: not enough arguments for all format specifiers``` The file name needs to be passed to `format` as a parameter with format `%s` rather than embedding it in the format string, or else ```log "[format ...][$q get file]"``` --- webif/lib/auto/deq | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webif/lib/auto/deq b/webif/lib/auto/deq index 435478a..41eec9a 100755 --- a/webif/lib/auto/deq +++ b/webif/lib/auto/deq @@ -115,8 +115,8 @@ proc ::auto::dumpq {qq} { if {[$q get action] in $::auto::plugins} { set pri $::auto::plugins([$q get action]) } - log [format " C: %4d %5d %8s - [$q get file]" \ - [$q get id] $pri [$q get action]] 2 + log [format " C: %4d %5d %8s - %s" \ + [$q get id] $pri [$q get action] [$q get file]] 2 } } From d7c15163e146bc11f48a673bf68ed710d20f91d3 Mon Sep 17 00:00:00 2001 From: HummyPkg Date: Fri, 16 Oct 2020 14:28:17 +0100 Subject: [PATCH 5/5] Update release version --- CONTROL/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTROL/control b/CONTROL/control index 04c00ae..8a5bd65 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: webif Priority: optional Section: web -Version: 1.4.8-9 +Version: 1.4.8-10 Architecture: mipsel Maintainer: af123@hpkg.tv Depends: tcpfix,webif-channelicons(>=1.1.27),lighttpd(>=1.4.39-1),jim(>=0.79),jim-pack(>=0.79),jim-oo(>=0.77),jim-sqlite3(>=0.77),jim-cgi(>=0.7-2),jim-binary(>=0.76),service-control(>=2.3),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.2.8),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.13),webif-charts(>=1.2-1),stripts(>=1.4.2),tmenu(>=1.21-2),ffmpeg(>=2.8),id3v2,multienv(>=1.6),tcpping(>=1.1),e2fsprogs,wireless-tools(>=29-1),dbupdate,recmon(>=2.0.7),hwctl,nugget(>=0.98),sqlite3(>=3.15.1),jim-xconv,zip(>=3.0-1),wget