forked from hummypkg/webif
allow multiple ops for ad-hoc jobs. Some escaping cleanups. Add op for join
git-svn-id: file:///root/webif/svn/pkg/webif/trunk@3351 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
parent
7b7651b5f8
commit
0c0ea08f09
@ -1,7 +1,7 @@
|
|||||||
Package: webif
|
Package: webif
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: web
|
Section: web
|
||||||
Version: 1.3.2-16
|
Version: 1.3.2-17
|
||||||
Architecture: mipsel
|
Architecture: mipsel
|
||||||
Maintainer: af123@hpkg.tv
|
Maintainer: af123@hpkg.tv
|
||||||
Depends: tcpfix,webif-channelicons(>=1.1.24),lighttpd(>=1.4.39-1),jim(>=0.76-2),jim-oo,jim-sqlite3(>=0.76),jim-cgi(>=0.7-1),jim-binary(>=0.76),service-control(>=2.3),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.2.3),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.9),webif-charts(>=1.2-1),stripts(>=1.2.5-3),tmenu(>=1.08),ffmpeg,id3v2,multienv(>=1.6),tcpping(>=1.1),e2fsprogs,wireless-tools(>=29-1),dbupdate,recmon(>=2.0.7),hwctl,nugget(>=0.95)
|
Depends: tcpfix,webif-channelicons(>=1.1.24),lighttpd(>=1.4.39-1),jim(>=0.76-2),jim-oo,jim-sqlite3(>=0.76),jim-cgi(>=0.7-1),jim-binary(>=0.76),service-control(>=2.3),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.2.3),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.9),webif-charts(>=1.2-1),stripts(>=1.2.5-3),tmenu(>=1.08),ffmpeg,id3v2,multienv(>=1.6),tcpping(>=1.1),e2fsprogs,wireless-tools(>=29-1),dbupdate,recmon(>=2.0.7),hwctl,nugget(>=0.95)
|
||||||
|
@ -48,6 +48,9 @@ set statusops {
|
|||||||
crop { "Cropping"
|
crop { "Cropping"
|
||||||
"/img/cut.png style=\"padding: 0 0.2em 0 0.5em\""
|
"/img/cut.png style=\"padding: 0 0.2em 0 0.5em\""
|
||||||
}
|
}
|
||||||
|
join { "Joining"
|
||||||
|
"/img/cut.png style=\"padding: 0 0.2em 0 0.5em\""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
proc register_statusop {op name icon} {
|
proc register_statusop {op name icon} {
|
||||||
|
@ -26,9 +26,9 @@ if {![[settings] audiomp3]} {
|
|||||||
lappend cmd "${base}.mp3"
|
lappend cmd "${base}.mp3"
|
||||||
|
|
||||||
#puts "$cmd"
|
#puts "$cmd"
|
||||||
system startop mp3 $rfile
|
set token [system startop -multiple mp3 $rfile]
|
||||||
puts [exec {*}$cmd]
|
puts [exec {*}$cmd]
|
||||||
system endop mp3
|
system endop $token
|
||||||
|
|
||||||
if {[system pkginst id3v2]} {
|
if {[system pkginst id3v2]} {
|
||||||
puts [exec /mod/bin/id3v2 \
|
puts [exec /mod/bin/id3v2 \
|
||||||
|
@ -119,7 +119,7 @@ $('#save').button({icons: {primary: "ui-icon-disk"}})
|
|||||||
|
|
||||||
$('#back').button({icons: {primary: "ui-icon-arrowreturnthick-1-w"}})
|
$('#back').button({icons: {primary: "ui-icon-arrowreturnthick-1-w"}})
|
||||||
.on('click', function() {
|
.on('click', function() {
|
||||||
window.location = '/go/browse?dir=' + dir;
|
window.location = '/go/browse?dir=' + encodeURIComponent(dir);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#update').button()
|
$('#update').button()
|
||||||
|
@ -62,9 +62,9 @@ if {$invert} {
|
|||||||
|
|
||||||
#puts "CMD: $cmd"
|
#puts "CMD: $cmd"
|
||||||
|
|
||||||
system startop crop $rfile
|
set token [system startop -multiple crop $rfile]
|
||||||
puts [exec {*}$cmd]
|
puts [exec {*}$cmd]
|
||||||
system endop crop
|
system endop $token
|
||||||
|
|
||||||
set newname "$shname-[clock seconds]"
|
set newname "$shname-[clock seconds]"
|
||||||
puts "Renaming file group to $newname"
|
puts "Renaming file group to $newname"
|
||||||
|
@ -38,9 +38,9 @@ if {[file exists "$origdir/$shname.ts"]} {
|
|||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
system startop decrypt $rfile
|
set token [system startop -multiple decrypt $rfile]
|
||||||
exec wget -O "$rfile.decrypting" $url
|
exec wget -O "$rfile.decrypting" $url
|
||||||
system endop decrypt
|
system endop $token
|
||||||
|
|
||||||
puts "Moving recording to $origdir"
|
puts "Moving recording to $origdir"
|
||||||
|
|
||||||
|
@ -21,7 +21,9 @@ foreach file [split [cgi_get files] ","] {
|
|||||||
lappend cmd "-out" "$dir/$dst"
|
lappend cmd "-out" "$dir/$dst"
|
||||||
|
|
||||||
puts "($cmd)"
|
puts "($cmd)"
|
||||||
|
set token [system startop -multiple join "$dir/$dst"]
|
||||||
puts [exec {*}$cmd]
|
puts [exec {*}$cmd]
|
||||||
|
system endop $token
|
||||||
|
|
||||||
set ts [ts fetch "$dir/$dst.ts"]
|
set ts [ts fetch "$dir/$dst.ts"]
|
||||||
$ts settitle $dst
|
$ts settitle $dst
|
||||||
|
@ -18,12 +18,12 @@ set base [file rootname $rfile]
|
|||||||
set shname [file tail $base]
|
set shname [file tail $base]
|
||||||
puts "Processing $shname"
|
puts "Processing $shname"
|
||||||
|
|
||||||
system startop mpg $rfile
|
set token [system startop -multiple mpg $rfile]
|
||||||
puts [exec /mod/bin/ffmpeg -y -benchmark -v 0 \
|
puts [exec /mod/bin/ffmpeg -y -benchmark -v 0 \
|
||||||
-i $rfile \
|
-i $rfile \
|
||||||
-map 0:0 -map 0:1 \
|
-map 0:0 -map 0:1 \
|
||||||
-vcodec copy -acodec copy "${base}.mpg"]
|
-vcodec copy -acodec copy "${base}.mpg"]
|
||||||
endop mpg
|
system endop $token
|
||||||
|
|
||||||
set xtime [expr [expr [clock milliseconds] - $xstart] / 1000.0]
|
set xtime [expr [expr [clock milliseconds] - $xstart] / 1000.0]
|
||||||
puts "Time taken: $xtime"
|
puts "Time taken: $xtime"
|
||||||
|
@ -35,12 +35,12 @@ foreach ext $tsgroup {
|
|||||||
file rename "$base.$ext" "${origdir}/$tail.$ext"
|
file rename "$base.$ext" "${origdir}/$tail.$ext"
|
||||||
}
|
}
|
||||||
|
|
||||||
system startop shrink $rfile
|
set token [system startop -multiple shrink $rfile]
|
||||||
puts [exec /mod/bin/stripts \
|
puts [exec /mod/bin/stripts \
|
||||||
"$origdir/$shname" \
|
"$origdir/$shname" \
|
||||||
"$dir/$shname" \
|
"$dir/$shname" \
|
||||||
]
|
]
|
||||||
system endop shrink
|
system endop $token
|
||||||
|
|
||||||
# Set the file time to match the old file
|
# Set the file time to match the old file
|
||||||
ts touchgroup "$dir/$shname.ts" "$origdir/$shname.ts"
|
ts touchgroup "$dir/$shname.ts" "$origdir/$shname.ts"
|
||||||
|
@ -34,18 +34,22 @@ $('button.usethm').disable().on('click', function(e) {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var pos = $(this).attr('pos');
|
var pos = $(this).attr('pos');
|
||||||
$('button,input').disable();
|
$('button,input').disable();
|
||||||
$.get('/browse/thumbnail/set.jim?file=' +
|
$.get('/browse/thumbnail/set.jim',
|
||||||
encodeURIComponent(file) + '&pos=' + pos,
|
{
|
||||||
function() {
|
'file': file,
|
||||||
|
'pos': pos
|
||||||
|
}, function() {
|
||||||
window.location.href = '/go/browse?dir=' +
|
window.location.href = '/go/browse?dir=' +
|
||||||
encodeURIComponent(dir);
|
encodeURIComponent(dir);
|
||||||
});;
|
});;
|
||||||
});
|
});
|
||||||
|
|
||||||
var start = $('#start').text();
|
$.get('/browse/thumbnail/mkrange.jim',
|
||||||
var end = $('#end').text();
|
{
|
||||||
$.get('/browse/thumbnail/mkrange.jim?file=' + encodeURIComponent(file) +
|
'file': file,
|
||||||
'&s=' + start + '&e=' + end, function() {
|
's': $('#start').text(),
|
||||||
|
'e': $('#end').text()
|
||||||
|
}, function() {
|
||||||
$('img.bmp').each(function(i) {
|
$('img.bmp').each(function(i) {
|
||||||
var pos = $(this).attr('pos');
|
var pos = $(this).attr('pos');
|
||||||
$(this).attr('src',
|
$(this).attr('src',
|
||||||
|
@ -340,10 +340,9 @@ ts method mkbmps {{offset 0}} {
|
|||||||
|
|
||||||
ts method mkbmp {{offset 0} {ext ""}} {
|
ts method mkbmp {{offset 0} {ext ""}} {
|
||||||
set bfile [file rootname $file]
|
set bfile [file rootname $file]
|
||||||
if {[catch {
|
set cmd [list /mod/bin/ffmpeg -loglevel fatal -ss $offset -i $file \
|
||||||
exec /mod/bin/ffmpeg -loglevel fatal -ss $offset -i $file \
|
-frames 1 -pix_fmt argb -vf vflip -s 140x78 "$bfile$ext.bmp"]
|
||||||
-frames 1 -pix_fmt argb -vf vflip -s 140x78 "$bfile$ext.bmp"
|
if {[catch { exec {*}$cmd } msg]} {
|
||||||
} msg]} {
|
|
||||||
puts "ERROR: $msg"
|
puts "ERROR: $msg"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user