#!/mod/bin/jimsh package require cgi source /mod/webif/lib/setup require ts.class pretty_size system.class settings.class escape browse.class cgi_input set ignore {.nts .thm .hmi} set include {.ts .avi .mpg .mpeg .wmv .mkv .mp3 .mp4 .mov .hmt} set dir [cgi_get dir [system mediaroot]] set model [system model] set dustbin [system dustbin 1] proc icon {img {hover ""} {extra ""} {class "va"}} { puts -nonewline "" } proc directory {file bfile tbfile {img /images/711_1_09_Media_Folder.png}} { if {$bfile eq $::dustbin} { set img "/img/Dustbin_Folder.png" } lassign [{dir iconset} $file] icons attrs puts "
[join $icons ""]
" } puts "
$sz
" # Icons set locked 0 set encd 0 set odencd 1 set def unknown set bx 0 set dlna 0 if {$type eq "ts"} { # HD / SD if {[$ts get definition] eq "HD"} { set def HD set img "172_1_00_HD" } else { set def SD set img "172_1_26_SD" } icon "/images/$img.png" # Locked if {[$ts flag "Locked"] > 0} { set locked 1 icon "/images/178_1_00_Icon_Lock.png" "Locked" } # Encrypted if {[$ts flag "Encrypted"] > 0} { set encd 1 icon "/images/749_1_26_Video_Encryption.png" "" } if {![$ts flag "ODEncrypted"]} { set odencd 0 icon "/img/Decrypted.png" "Decrypted" } # Guidance if {[$ts flag "Guidance"] > 0} { icon "/images/174_1_26_GuidancePolicy.png" } # Indexed if {$::model eq "HDR" && [llength [$ts dlnaloc]]} { icon "/img/dlna.png" "Indexed by DLNA Server" set dlna 1 } # Shrunk (shown when necessary via Ajax) icon "/img/compress.png" "Shrunk" \ "id=\"sp_$tbfile\"" "va hidden" } puts "