forked from hummypkg/webif
add force dedup process
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@2033 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
parent
4d895e464d
commit
876d5b5e8a
@ -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
|
||||
|
@ -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 {
|
||||
<button id=browse>Back to media browser</button>
|
||||
}
|
||||
|
||||
if {!$doit} { puts "<button id=dedup>Process folder</button>" }
|
||||
if {!$doit} {
|
||||
puts "<button id=dedup>Process folder</button>"
|
||||
} else {
|
||||
puts "<button id=reset>Force re-processing of folder.</button>"
|
||||
}
|
||||
|
||||
puts {
|
||||
</small>
|
||||
|
@ -10,5 +10,9 @@ $('#dedup').button().click(function() {
|
||||
window.location = window.location + '&doit=1';
|
||||
});
|
||||
|
||||
$('#reset').button().click(function() {
|
||||
window.location = window.location + '&reset=1';
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user