fix lock, add guidance icons, add new icon

git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@205 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2011-06-27 19:57:32 +00:00
parent 32db0c900b
commit 7025cf09f5
6 changed files with 74 additions and 6 deletions

View File

@ -1,10 +1,10 @@
Package: webif
Priority: optional
Section: web
Version: 0.5.5
Version: 0.5.6
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
Depends: mongoose(>=2.11-5),jim(>=0.71-1),jim-sqlite3(>=0.71-1),jim-cgi(>=0.2),jim-oo,service-control,busybox(>=1.18.3-1),lsof,epg(>=1.0.2),hmt(>=1.0.5),ssmtp
Depends: mongoose(>=2.11-5),jim(>=0.71-1),jim-sqlite3(>=0.71-1),jim-cgi(>=0.2),jim-oo,service-control,busybox(>=1.18.3-1),lsof,epg(>=1.0.2),hmt(>=1.0.6),ssmtp
Replaces: af123-webif
Conflicts: af123-webif
Suggests: ffmpeg

View File

@ -47,18 +47,49 @@ proc entry {file} {{i 0}} {
set ts [ts fetch $file 1]
set img 741_1_10_Video_Title.png
set pad 0
set newpad "top: -6; left: 4;"
} else {
set type gen
set ts 0
set img 743_4_10_Video_Xvid_File.png
set pad "2 2 2 2"
set pad "2"
set newpad "top: -2; left: 2;"
}
puts "
<div class=\"va bf\" id=[incr i]>
<a class=bf file=\"$file\" type=$type href=#>
"
set new 0
if {$type eq "ts"} {
if {[$ts flag "New"] > 0} { set new 1 }
} else {
if {![file exists "[file rootname $file].hmi"]} { set new 1 }
}
if {$new} {
# Overlay the new image over the media one.
puts "
<span style=\"position: relative; left: 0; top 0;
padding: $pad\">
<img class=va border=0 width=45 src=/images/$img
style=\"padding: $pad;
position: relative; top: 0; left: 0\">
<img class=va border=0
src=/images/743_1_10_Video_New.png
style=\"position: absolute; $newpad
width: 18\">
</span>
"
} else {
puts "
<img class=va border=0 width=45 src=/images/$img
style=\"padding:$pad\">
"
}
puts "
$bfile
</a>
"
@ -84,6 +115,20 @@ proc entry {file} {{i 0}} {
puts "<img class=va src=/images/178_1_00_Icon_Lock.png
height=21>"
}
# Encrypted
if {[$ts flag "Encrypted"] > 0} {
puts "<img class=va
src=/images/749_1_26_Video_Encryption.png
height=21>"
}
# Guidance
if {[$ts flag "Guidance"] > 0} {
puts "<img class=va
src=/images/174_1_26_GuidancePolicy.png
height=21>"
}
}
# Opt+ button

View File

@ -34,6 +34,20 @@ if {$type eq "ts"} {
<th>Synopsis</th>
<td>[$ts get synopsis]</td>
</tr><tr>
"
if {[$ts flag "Guidance"] > 0} {
puts "
<th>Guidance</th>
<td><img class=va
src=/images/174_1_26_GuidancePolicy.png height=21>
[$ts get guidance]
</td>
</tr><tr>
"
}
puts "
<th>Definition</th>
<td>
"

View File

@ -9,7 +9,7 @@ puts ""
cgi_input
#cgi_dump
set _cgi(file) "/media/My Video/The Walking Dead/The Walking Dead S01E06.ts"
#set _cgi(file) "/media/My Video/The Walking Dead/The Walking Dead S01E06.ts"
set file [dict get $_cgi file]
set ts [ts fetch $file]

View File

@ -2,6 +2,7 @@
package require cgi
source /mod/var/mongoose/lib/epg.class
source /mod/var/mongoose/lib/spinner.class
source /mod/var/mongoose/lib/altrow
source /mod/var/mongoose/lib/cat
@ -112,6 +113,12 @@ $db close
puts "</fieldset>"
puts "</form>"
[spinner new {
text "Loading EPG Data..."
size "1.2em"
style "margin: 1em;"
}] start
if {$ct > 0 } {
set records [epg fetch dump -type $ct]
} elseif {$crid ne ""} {

View File

@ -13,6 +13,7 @@ class ts {
end 0
flags ""
error ""
guidance ""
}
ts method duration {} {
@ -35,6 +36,7 @@ ts method _parse {line} {
set start [lindex $vars 5]
set end [lindex $vars 6]
set flags [split [string range [lindex $vars 7] 0 end-1] ,]
set guidance [lindex $vars 8]
}
ts method flag {f} {