diff --git a/CONTROL/control b/CONTROL/control index e632ca2..3ace80a 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: webif Priority: optional Section: web -Version: 1.0.16-2 +Version: 1.0.16-3 Architecture: mipsel Maintainer: af123@hummypkg.org.uk Depends: webif-channelicons(>=1.1.12-2),lighttpd(>=1.4.35-2),jim(>=0.75-1),jim-oo,jim-sqlite3(>=0.75),jim-cgi(>=0.7),jim-binary(>=0.75),service-control(>=1.2),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.0.13),hmt(>=1.1.21),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),mongoose diff --git a/webif/html/dedup/dedup.jim b/webif/html/dedup/dedup.jim index 227e4c6..3d65806 100755 --- a/webif/html/dedup/dedup.jim +++ b/webif/html/dedup/dedup.jim @@ -11,6 +11,7 @@ source process.jim set dir [cgi_get dir "/media/My Video"] set doit [cgi_get doit 0] +set reset [cgi_get reset 0] jscss script.js @@ -31,6 +32,11 @@ foreach file [readdir $dir] { set file "$dir/$file" if {[file extension $file] ne ".hmt"} { continue } + if {$reset} { + set ts [ts fetch $file 1] + $ts unset_deduped + } + set base [file tail [file rootname $file]] lassign [dedupprocess $file] stat ts syn fn @@ -90,7 +96,11 @@ puts { } -if {!$doit} { puts "" } +if {!$doit} { + puts "" +} else { + puts "" +} puts { diff --git a/webif/html/dedup/script.js b/webif/html/dedup/script.js index 44dbea4..ef54200 100755 --- a/webif/html/dedup/script.js +++ b/webif/html/dedup/script.js @@ -10,5 +10,9 @@ $('#dedup').button().click(function() { window.location = window.location + '&doit=1'; }); +$('#reset').button().click(function() { + window.location = window.location + '&reset=1'; +}); + }); diff --git a/webif/lib/ts.class b/webif/lib/ts.class index 8a322f4..7ce560a 100644 --- a/webif/lib/ts.class +++ b/webif/lib/ts.class @@ -107,6 +107,13 @@ ts method set_deduped {} { return 1 } +ts method unset_deduped {} { + set cmd [list /mod/bin/hmt -dedup $file] + exec {*}$cmd + lremove flags "Deduped" + return 1 +} + ts method unenc {} { set cmd [list /mod/bin/hmt -protect $file] exec {*}$cmd