-- vim:set ft=lua: dofile(mg.script_name:gsub('[^\\/]*$','')..'util.lua') PAGE_COUNT=30 tab=GetVarInt(mg.request_info.query_string,'tab') or 1 pageIndex=GetVarInt(mg.request_info.query_string,'page',0,100000) or 0 ct={ title='チューナー別', css='
\n', js='
\n', progres=true, macro=sidePanel } edcb.htmlEscape=15 a=edcb.GetReserveData() table.sort(a, function(a,b) return os.time(a.startTime) < os.time(b.startTime) end) ct.main='
\n' ..(sidePanel and sidePanelTemplate(true) or '') ..'
\n' ..'
\n' ..'

\n' ..'
\n
\n' ..' 録画\n' ..' | 日付\n' ..' | 番組名\n' ..' | サービス\n' ..' | コメント\n' ..' | 予想サイズ\n' ..' | 優先度\n' ct.tab='' ct.Scrollable=true ctt={} rsdef=(edcb.GetReserveData(0x7FFFFFFF) or {}).recSetting rate={} for i,v in ipairs(edcb.GetTunerReserveAll()) do ct.tab=ct.tab..''..i..':'..v.tunerName:gsub( "BonDriver_(.*).dll", "%1")..' ('..#v.reserveList..')\n' table.insert(ctt, '
--- | --- | --- | --- | --- | --- | ---
\n') b={} for j,w in ipairs(v.reserveList) do for k,x in ipairs(edcb.GetReserveData()) do if w==x.reserveID then table.insert(b ,x) break end end end table.sort(b, function(a,b) return os.time(a.startTime) < os.time(b.startTime) end) for j,w in ipairs(b) do size=nil if w.recSetting.recMode~=4 then --予想ファイルサイズ for j=1,4 do key=('%04X%04X%04X'):format((j>3 and 65535 or w.onid),(j>2 and 65535 or w.tsid),(j>1 and 65535 or w.sid)) rate[key]=rate[key] or tonumber(edcb.GetPrivateProfile('BITRATE',key,0,'Bitrate.ini')) or 0 if rate[key]>0 then break elseif j==4 then rate[key]=19456 end end size=rate[key]/8*1000*math.max((w.recSetting.startMargin or rsdef and rsdef.startMargin or 0)+ (w.recSetting.endMargin or rsdef and rsdef.endMargin or 0)+w.durationSecond,0) end bg=w.recSetting.recMode==5 and ' disabled' or w.overlapMode==1 and ' partially' or w.overlapMode==2 and ' shortage' or nil table.insert(ctt, '
\n' ..' os.time() and '>' or ' class="recmark">') ..'\n | '..FormatTimeAndDuration(w.startTime, w.durationSecond) ..'\n | '..ConvertTitle(w.title) ..'\n | '..w.stationName ..'\n | '..w.comment ..'\n | '..(size and ('%.1fGB'):format(size/1024/1024/1024) or '-') ..'\n | priority_high'..w.recSetting.priority ..'\n') end table.insert(ctt, '
\n') end ct.main=ct.main..table.concat(ctt)..'

\n
\n
\n' ct=template(ct) mg.write(ct:Pop(Response(200,'text/html','utf-8',ct.len)..(ct.gzip and 'Content-Encoding: gzip\r\n' or '')..'\r\n'))