-- vim:set ft=lua: dofile(mg.script_name:gsub('[^\\/]*$','')..'util.lua') vtag=GetVarInt(mg.request_info.query_string,'vtag') or -1 ct=CreateContentBuilder(GZIP_THRESHOLD_BYTE) ct:Append([=[ 録画済み詳細 - EDCB

録画済み詳細

]=]) id=GetVarInt(mg.request_info.query_string,'id') or 0 offset=GetVarInt(mg.request_info.query_string,'offset',0,100) audio2=GetVarInt(mg.request_info.query_string,'audio2')==1 dual=GetVarInt(mg.request_info.query_string,'dual',0,2) cinema=GetVarInt(mg.request_info.query_string,'cinema')==1 post=AssertPost() if post then if mg.get_var(post,'protect') then edcb.ChgProtectRecFileInfo(id,mg.get_var(post,'protect')=='y') ct:Append('
変更しました
\n') elseif mg.get_var(post,'del') then edcb.DelRecFileInfo(id) ct:Append('
削除しました
\n') end end w=edcb.GetRecFileInfoBasic(id) edcb.htmlEscape=15 v=edcb.GetRecFileInfo(id) if v then if #v.programInfo>0 then v.programInfo=DecorateUri(v.programInfo) elseif v.eid~=65535 then --過去番組情報を探してみる ev=edcb.EnumEventInfoArchive and edcb.EnumEventInfoArchive({{onid=v.onid,tsid=v.tsid,sid=v.sid}},{startTime=v.startTime,durationSecond=1}) if ev and #ev>0 then v.programInfo=ConvertEpgInfoText2(ev[1]) else --番組情報を探してみる ev=edcb.SearchEpg(v.onid,v.tsid,v.sid,v.eid) if ev and ev.startTime and os.time(ev.startTime)==os.time(v.startTime) then v.programInfo=ConvertEpgInfoText2(ev) end end end ct:Append('
\n' ..'
番組名
'..FormatTimeAndDuration(v.startTime, v.durationSecond)..'
'..v.serviceName..'
'..v.title..'
\n' ..'
結果
'..v.comment..'
\n' ..'
ドロップ
'..v.drops..'
\n' ..'
スクランブル
'..v.scrambles..'
\n' ..'
ファイル →Video' or '0">DL')..'
\n') ref=w and NativeToDocumentPath(w.recFilePath) if ref then for i,ext in ipairs({'.mp4','.webm',''}) do ff=edcb.FindFile and edcb.FindFile(w.recFilePath..ext,1) if ff then ct:Append((vtag==i and '' or '')) if ext=='' then fsec,fsize=0,0 f=edcb.io.open(w.recFilePath,'rb') if f then fsec,fsize=GetDurationSec(f) f:close() end ct:Append(' ('..('%dm%02ds|'):format(math.floor(fsec/60),fsec%60)..math.floor(fsize/1048576)..'M)
\n' ..'
\n' ..(vtag==0 and '\n' or '\n\n') ..'\n' ..'offset: \n' ..'audio2\n' ..'\n' ..'cinema\n' ..'
') if vtag==10 then ct:Append('\n') end else ct:Append(' ('..math.floor(ff[1].size/1048576)..'M)
\n') end end end end ct:Append('
\n' ..'
プロテクト
\n' ..'
\n' ..'\n' ..'\n' ..'
\n' ..(#v.programInfo>0 and '
番組情報
\n'..v.programInfo:gsub('\r?\n', '
\n')..'
\n' or '') ..(#v.errInfo>0 and '
エラーログ
\n'..v.errInfo:gsub('\r?\n', '
\n')..'
\n' or '') ..'
-
\n' ..'
\n' ..'\n' ..'\n' ..'
\n' ..'
\n') end ct:Append([=[
]=]) ct:Finish() mg.write(ct:Pop(Response(200,'text/html','utf-8',ct.len)..(ct.gzip and 'Content-Encoding: gzip\r\n' or '')..'\r\n'))