-- vim:set ft=lua: dofile(mg.script_name:gsub('[^\\/]*$','')..'util.lua') onid,tsid,sid,eid=GetVarEventID(mg.request_info.query_string,'id') presetID=GetVarInt(mg.request_info.query_string,'presetID') or 65535 if eid>0 then epgInfo, audio, End = ConvertEpgInfoText2(onid, tsid, sid, eid) else onid,tsid,sid,startTime=GetVarPastEventID(mg.request_info.query_string,'id') et=edcb.EnumEventInfoArchive({{onid=onid, tsid=tsid, sid=sid}}, {startTime=os.date('!*t',startTime), durationSecond=1}) if et and #et~=0 then epgInfo, audio, End = ConvertEpgInfoText2(et[1]) end end r=nil edcb.htmlEscape=15 for i,v in ipairs(edcb.GetReserveData()) do if v.onid==onid and v.tsid==tsid and v.sid==sid and v.eid==eid then r=v recording=edcb.GetRecFilePath(r.reserveID) break end end if not r and presetID==65535 then presetID=0 end ct={ title='番組情報', searchlinks=true, fixedTabs=true } --検索等のリンクを生成 ct.js='
\n' ct.main='
\n' ..'
\n' ..'
\n' ..(epgInfo or '') if not End and epgInfo then ct.reserve=r ct.main=ct.main..'
\n' ..'\n' ..'
\n' ..'
プリセット
\n' ..'
\n' ..'\n' ..'\n' ..'\n' ..'\n' ..'\n' ..'\n' ..RecSettingTemplate(rs)..'
\n' ..'
\n' ..(recording and '
\n
\n' ..PlayerTemplate('preload="none"', audio) ..'
' ..'
\n
\n' or '') ..'
\n' ..'
\n' ..'
\n' ..'
\n' ..'\n
\n' ..'
\n' ..'
\n' ct.tab='番組詳細\n' ..'録画設定\n' ..(recording and '再生\n' or '') end ct.main=ct.main..'
\n\n' ct=Template(ct) mg.write(ct:Pop(Response(200,'text/html','utf-8',ct.len,ct.gzip) ..'Cross-Origin-Embedder-Policy: require-corp\r\n' ..'Cross-Origin-Opener-Policy: same-origin\r\n' ..'\r\n'))