"
}
proc entry {file} {{i 0}} {
set bfile [file tail $file]
if {[string index $bfile 0] == "\025"} {
set bfile [string range $bfile 1 end]
}
if [file isdirectory "$file"] {
directory $file $bfile
continue
}
set ext [file extension $file]
if {$ext in $::ignore || $ext ni $::include} { continue }
file stat $file st
set sz [pretty_size $st(size)]
set base [file rootname $file]
if {$ext eq ".ts" && [file exists "${base}.nts"]} {
set type ts
set ts [ts fetch $file 1]
set img Video_TS
} else {
set type gen
set ts 0
set img Video_Other
}
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} { append img _New }
set fscl "fs"
if {$type eq "ts"} {
set fscl "fs fsts"
}
puts "
$bfile
"
# Size
puts " ($sz) "
# Icons
set locked 0
set encd 0
set odencd 1
set def unknown
set bx 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"
}
puts ""
# Locked
if {[$ts flag "Locked"] > 0} {
set locked 1
puts ""
}
# Encrypted
if {[$ts flag "Encrypted"] > 0} {
set encd 1
puts ""
}
if {![$ts flag "ODEncrypted"]} {
puts ""
set odencd 0
}
# Guidance
if {[$ts flag "Guidance"] > 0} {
puts ""
}
set bx [$ts get bookmarks]
}
# Opt+ button
puts "
"
puts "
"
}
set dir [cgi_get dir [system mediaroot]]
######################################################################
# Render web page
header
puts {