tweak genre code, table in ts.class
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1320 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
parent
3dbc3cbf82
commit
f7933beaf8
@ -1,9 +1,9 @@
|
||||
Package: webif
|
||||
Priority: optional
|
||||
Section: web
|
||||
Version: 0.10.2
|
||||
Version: 0.10.2-1
|
||||
Architecture: mipsel
|
||||
Maintainer: af123@hummypkg.org.uk
|
||||
Depends: webif-channelicons(>=1.0.3),mongoose(>=3.0-7),jim(>=0.73-1),jim-oo,jim-sqlite3(>=0.73-1),jim-cgi(>=0.5),jim-binary,service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.9-1),hmt(>=1.1.8),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.1.2),smartmontools,tmenu(>=1.04)
|
||||
Depends: webif-channelicons(>=1.0.3),mongoose(>=3.0-7),jim(>=0.73-1),jim-oo,jim-sqlite3(>=0.73-1),jim-cgi(>=0.5),jim-binary,service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.9-1),hmt(>=1.1.10),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.1.2),smartmontools,tmenu(>=1.04)
|
||||
Suggests: ffmpeg
|
||||
Description: An evolving web interface for the Humax.
|
||||
|
@ -148,20 +148,19 @@ proc entry {file} {{i 0}} {
|
||||
set bx 0
|
||||
set dlna 0
|
||||
if {$type eq "ts"} {
|
||||
# Genre
|
||||
switch [$ts get genre] {
|
||||
16 { set img "Movie" }
|
||||
32 { set img "News" }
|
||||
48 { set img "Special" }
|
||||
64 { set img "Sports" }
|
||||
80 { set img "Children" }
|
||||
96 { set img "Education" }
|
||||
160 { set img "Leisure" }
|
||||
240 { set img "Show" }
|
||||
default { set img "Unclassified" }
|
||||
set genre [$ts get genre]
|
||||
set glist [ts genrelist]
|
||||
if {[dict exists $glist $genre]} {
|
||||
set ret $glist($genre)
|
||||
} else {
|
||||
set ret $glist(0)
|
||||
}
|
||||
lassign $ret txt img
|
||||
if {$img eq "Unclassified"} {
|
||||
icon "/images/173_3_26_G3_$img.png" $txt
|
||||
} else {
|
||||
icon "/images/173_3_00_G3_$img.png" $txt
|
||||
}
|
||||
#icon "/images/173_1_00_G1_$img.png"
|
||||
icon "/images/173_3_00_G3_$img.png" $img
|
||||
|
||||
# HD / SD
|
||||
if {[$ts get definition] eq "HD"} {
|
||||
|
@ -129,16 +129,27 @@ puts {
|
||||
</th>
|
||||
<td>
|
||||
<select name="rename_genre" id="rename_genre"
|
||||
style="vertical-align: middle"
|
||||
class="text ui-widget-content ui-corner-all">
|
||||
<option value=0>Unclassified
|
||||
<option value=16>Film
|
||||
<option value=32>News & Factual
|
||||
<option value=48>Entertainment
|
||||
<option value=64>Sport
|
||||
<option value=80>Children
|
||||
<option value=96>Education
|
||||
<option value=160>Lifestyle
|
||||
<option value=240>Drama
|
||||
}
|
||||
|
||||
set glist [ts genrelist]
|
||||
foreach genre [array names glist] {
|
||||
lassign $glist($genre) txt img
|
||||
if {$img eq "Unclassified"} {
|
||||
set img /images/173_3_26_G3_$img.png
|
||||
} else {
|
||||
set img /images/173_3_00_G3_$img.png
|
||||
}
|
||||
puts "<option value=$genre style=\"
|
||||
background: url($img) no-repeat left;
|
||||
padding: 8px 0 8px 30px;
|
||||
vertical-align: middle;
|
||||
\" onclick=\"this.parentNode.setAttribute('style',
|
||||
this.getAttribute('style'));\">$txt"
|
||||
}
|
||||
|
||||
puts {
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -249,3 +249,17 @@ proc {ts renamegroup} {from to} {
|
||||
}
|
||||
}
|
||||
|
||||
proc {ts genrelist} {} {
|
||||
return {
|
||||
0 { Unclassified Unclassified }
|
||||
16 { Film Movie }
|
||||
32 { "News & Factual" News }
|
||||
64 { Sport Sports }
|
||||
80 { Children Children }
|
||||
96 { Entertainment Special }
|
||||
144 { Education Education }
|
||||
160 { Lifestyle Leisure }
|
||||
240 { Drama Show }
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user