allow multiple operations of the same type. Leave recording in the list if file size is changing
git-svn-id: file:///root/webif/svn/pkg/webif/trunk@3341 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
parent
8710cb0480
commit
9e685245b9
@ -1,7 +1,7 @@
|
||||
Package: webif
|
||||
Priority: optional
|
||||
Section: web
|
||||
Version: 1.3.2-13
|
||||
Version: 1.3.2-14
|
||||
Architecture: mipsel
|
||||
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)
|
||||
|
@ -45,6 +45,9 @@ set statusops {
|
||||
shrink { "Shrinking"
|
||||
"/img/compress.png style=\"padding: 0 0.2em 0 0.5em\""
|
||||
}
|
||||
crop { "Cropping"
|
||||
"/img/cut.png style=\"padding: 0 0.2em 0 0.5em\""
|
||||
}
|
||||
}
|
||||
|
||||
proc register_statusop {op name icon} {
|
||||
@ -98,13 +101,32 @@ proc get_data {} {
|
||||
}
|
||||
}
|
||||
foreach file [dict keys $::ops] {
|
||||
if {![dict exists $ret $file] && [file exists $file]} {
|
||||
set ret($file) [file size $file]
|
||||
if {![dict exists $ret $file]} {
|
||||
if {[file exists $file]} {
|
||||
set ret($file) [file size $file]
|
||||
} else {
|
||||
set ret($file) 0
|
||||
}
|
||||
}
|
||||
}
|
||||
return $ret
|
||||
}
|
||||
|
||||
proc add_output {icon mode name} {
|
||||
global runmode output
|
||||
|
||||
if {$runmode eq "cgi"} {
|
||||
lappend output [concat \
|
||||
"<span class=\"va stitem\">\n" \
|
||||
" <img class=va src=$icon>\n" \
|
||||
" <span>$mode <i>$name</i></span>\n" \
|
||||
"</span>\n" \
|
||||
]
|
||||
} else {
|
||||
lappend output "$mode $name"
|
||||
}
|
||||
}
|
||||
|
||||
set play 0
|
||||
set rec 0
|
||||
set output {}
|
||||
@ -164,9 +186,14 @@ if {[llength $data]} {
|
||||
foreach file [array names data] {
|
||||
set bname [file rootname [file tail $file]]
|
||||
|
||||
if {[dict exists $ops $file]} {
|
||||
set mode $ops($file)
|
||||
} elseif {$data($file) == -1} {
|
||||
set name [string map {
|
||||
"/mnt/hd2/My Video/" ""
|
||||
"/media/drive1/Video/" ""
|
||||
"/media/" ""
|
||||
".ts" ""
|
||||
} $file]
|
||||
|
||||
if {$data($file) == -1} {
|
||||
set mode chase
|
||||
} elseif {$rr} {
|
||||
if {$file in $recs} {
|
||||
@ -183,6 +210,17 @@ if {[llength $data]} {
|
||||
}
|
||||
}
|
||||
|
||||
if {[dict exists $ops $file]} {
|
||||
if {$mode eq "rec"} {
|
||||
set mode "Recording"
|
||||
set icon "745_1_11_Video_1REC.png"
|
||||
add_output $icon $mode $name
|
||||
}
|
||||
set mode $ops($file)
|
||||
}
|
||||
|
||||
regexp -- {^([^0-9]+)} $mode x mode
|
||||
|
||||
switch $mode {
|
||||
chase {
|
||||
incr rec
|
||||
@ -214,23 +252,7 @@ if {[llength $data]} {
|
||||
set icon "/images/$icon"
|
||||
}
|
||||
|
||||
set name [string map {
|
||||
"/mnt/hd2/My Video/" ""
|
||||
"/media/drive1/Video/" ""
|
||||
"/media/" ""
|
||||
".ts" ""
|
||||
} $file]
|
||||
|
||||
if {$runmode eq "cgi"} {
|
||||
lappend output [concat \
|
||||
"<span class=\"va stitem\">\n" \
|
||||
" <img class=va src=$icon>\n" \
|
||||
" <span>$mode <i>$name</i></span>\n" \
|
||||
"</span>\n" \
|
||||
]
|
||||
} else {
|
||||
lappend output "$mode $name"
|
||||
}
|
||||
add_output $icon $mode $name
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -60,13 +60,11 @@ if {$invert} {
|
||||
lappend cmd "-cutBookMarks"
|
||||
}
|
||||
|
||||
puts "CMD: $cmd"
|
||||
#puts "CMD: $cmd"
|
||||
|
||||
system startop crop $rfile
|
||||
puts [exec {*}$cmd]
|
||||
#puts [exec /mod/bin/nicesplice \
|
||||
# -in "$origdir/$shname" \
|
||||
# -out "$dir/$shname" \
|
||||
# -cutBookMarks]
|
||||
system endop crop
|
||||
|
||||
set newname "$shname-[clock seconds]"
|
||||
puts "Renaming file group to $newname"
|
||||
|
BIN
webif/html/img/cut.png
Normal file
BIN
webif/html/img/cut.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 648 B |
@ -759,9 +759,13 @@ proc {system checkop} {op} {
|
||||
return $ret
|
||||
}
|
||||
|
||||
proc {system startop} {op file} {
|
||||
proc {system startop} {args op file} {
|
||||
if {![regexp -nocase -- {^[a-z0-9]+$} $op]} { return 0 }
|
||||
if {[dict exists $::system::ops $op]} {
|
||||
if {"-multiple" in $args} {
|
||||
set i 1
|
||||
while {[dict exists $::system::ops "$op$i"]} { incr i }
|
||||
append op $i
|
||||
} elseif {[dict exists $::system::ops $op]} {
|
||||
system endop $op
|
||||
}
|
||||
if {[catch {
|
||||
@ -775,7 +779,7 @@ proc {system startop} {op file} {
|
||||
error "Could not lock op file."
|
||||
}
|
||||
}]} { return 0 }
|
||||
return 1
|
||||
return $op
|
||||
}
|
||||
|
||||
proc {system endop} {op} {
|
||||
|
Loading…
Reference in New Issue
Block a user