2011-06-25 20:59:50 +00:00
|
|
|
#!/mod/bin/jimsh
|
|
|
|
|
|
|
|
package require cgi
|
2012-05-21 20:23:41 +00:00
|
|
|
source /mod/webif/lib/ts.class
|
2011-06-25 20:59:50 +00:00
|
|
|
|
|
|
|
puts "Content-Type: application/json"
|
|
|
|
puts ""
|
|
|
|
|
|
|
|
cgi_input
|
|
|
|
#cgi_dump
|
|
|
|
#set _cgi(file) "/media/My Video/Doctor Who/6.13._The_Almost_People.ts"
|
|
|
|
|
|
|
|
if {![dict exists $_cgi file]} { exit }
|
|
|
|
|
|
|
|
set file [dict get $_cgi file]
|
|
|
|
set ts [ts fetch $file]
|
|
|
|
|
|
|
|
puts "{"
|
|
|
|
puts "\"title\" : \"[$ts get title]\","
|
2012-11-18 12:07:53 +00:00
|
|
|
puts "\"synopsis\" : \"[$ts get synopsis]\","
|
|
|
|
puts "\"guidance\" : \"[$ts get guidance]\""
|
2011-06-25 20:59:50 +00:00
|
|
|
puts "}"
|
|
|
|
|