"
}
proc entry {file {ajax 0}} {
set bfile [lindex [split $file /] end]
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 eq ".ts"} {
tsfile $file $bfile $ajax
continue
}
if {$ext in $::ignore} { continue }
if {$ext in $::standard} {
genfile $file $bfile
continue
}
}
if {[dict exists $_cgi tsfile]} {
set file [dict get $_cgi tsfile]
set ts [ts fetch $file]
if {[dict exists $_cgi action]} {
switch [dict get $_cgi action] {
entry {
entry $file 1
}
delete {
if {[$ts delete]} {
puts "Successfully deleted $file."
} else {
puts "Problem deleting $file, [$ts get error]"
}
}
lock {
set action lock
if {[$ts flag "Locked"]} { set action unlock }
if {[$ts $action]} {
puts "Successfully [set action]ed $file."
} else {
puts "Problem [set action]ing $file,
[$ts get error]"
}
}
}
exit
}
source /mod/var/mongoose/lib/epg.class
puts "
Title
[$ts get title]
Synopsis
[$ts get synopsis]
Definition
"
if {[$ts get definition] eq "HD"} {
puts ""
} else {
puts ""
}
puts "
Channel
[epg channelicon [$ts get channel_name] 50 "vertical-align: middle"]
[$ts get channel_num] - [$ts get channel_name]
Start Time
"
puts [clock format [$ts get start] -format "%c %Z"]
puts "
End Time
"
puts [clock format [$ts get end] -format "%c %Z"]
puts "
Duration
[$ts duration] minute(s).
Size
[$ts size] MiB
Flags
[$ts get flags]
"
exit
}
if {[dict exists $_cgi dir]} {
set dir [dict get $_cgi dir]
} else {
set dir "/media/My Video"
}
source /mod/var/mongoose/html/lib/header.jim
puts {