From 47b23d76cf78b3f6f55a362b897f21eb6ef76508 Mon Sep 17 00:00:00 2001 From: hummypkg Date: Thu, 26 Nov 2015 00:33:26 +0000 Subject: [PATCH] allow dummy setting of flags (for dryruns) git-svn-id: file:///root/webif/svn/pkg/webif/trunk@2554 2a923420-c742-0410-a762-8d5b09965624 --- CONTROL/control | 2 +- webif/lib/ts.class | 20 ++++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/CONTROL/control b/CONTROL/control index f51c0f1..6f11a64 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: webif Priority: optional Section: web -Version: 1.2.5-9 +Version: 1.2.5-10 Architecture: mipsel Maintainer: af123@hummypkg.org.uk Depends: webif-channelicons(>=1.1.18),lighttpd(>=1.4.37-2),jim(>=0.76),jim-oo,jim-sqlite3(>=0.76),jim-cgi(>=0.7),jim-binary(>=0.76),service-control(>=2.1),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.2.0),hmt(>=2.0.8),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2-1),stripts(>=1.2.5-3),smartmontools,tmenu(>=1.08),ffmpeg,id3v2,multienv(>=1.6),tcpping(>=1.1),e2fsprogs,wireless-tools(>=29-1),dbupdate,recmon(>=2.0.7) diff --git a/webif/lib/ts.class b/webif/lib/ts.class index 5443d27..6e54173 100644 --- a/webif/lib/ts.class +++ b/webif/lib/ts.class @@ -126,10 +126,12 @@ set ::ts::flagmap { dedup Deduped } -ts method setflag {flag} { - set cmd [list /mod/bin/hmt +$flag $file] - if {[catch {exec {*}$cmd}]} { - throw 20 "Unknown flag." +ts method setflag {flag {dummy 0}} { + if {!$dummy} { + set cmd [list /mod/bin/hmt +$flag $file] + if {[catch {exec {*}$cmd}]} { + throw 20 "Unknown flag." + } } if {[dict exists $::ts::flagmap $flag]} { ladd flags $::ts::flagmap($flag) @@ -140,10 +142,12 @@ ts method setflag {flag} { } -ts method unsetflag {flag} { - set cmd [list /mod/bin/hmt -$flag $file] - if {[catch {exec {*}$cmd}]} { - throw 20 "Unknown flag." +ts method unsetflag {flag {dummy 0}} { + if {!$dummy} { + set cmd [list /mod/bin/hmt -$flag $file] + if {[catch {exec {*}$cmd}]} { + throw 20 "Unknown flag." + } } if {[dict exists $::ts::flagmap $flag]} { lremove flags $::ts::flagmap($flag)