-- vim:set ft=lua: dofile(mg.script_name:gsub('[^\\/]*$','')..'util.lua') ct={title='録画結果'} edcb.htmlEscape=15 a=edcb.GetRecFileInfoBasic() table.sort(a, function(a,b) return os.time(a.startTime) > os.time(b.startTime) end) pageIndex=GetVarInt(mg.request_info.query_string,'page',0,100000) or 0 PAGE_COUNT=tonumber(edcb.GetPrivateProfile('SET','PAGE_COUNT','30',ini)) if PAGE_COUNT==0 then PAGE_COUNT=#a end if math.ceil((#a/PAGE_COUNT)-1)>0 then pg='0 and 'href=\"recinfo.html?page=0"' or 'disabled')..'>first_page\n' pg=pg..'0 and 'href=\"recinfo.html?page='..(pageIndex-1)..'"' or 'disabled')..'>chevron_left\n' n=pageIndex>(#a/PAGE_COUNT-2) and math.floor(#a/PAGE_COUNT)-4 or math.max(0,pageIndex-2) for i=n, n+4 do pg=pg..(i>=0 and i<#a/PAGE_COUNT and ''..(i+1)..'\n' or '') end pg=pg..'chevron_right\n' pg=pg..'last_page\n' pg='\n' end ct.main='
\n' if sidePanel then ct.main=ct.main..[=[
info_outline録画結果
open_in_new

  • 結果
  • ジャンル
    • 映像
      • 音声
        • その他
          ]=] --if mg.get_var(mg.request_info.query_string,'del') then ct.main=ct.main..'
          \n' ..'
          \n' ..'
          \n' ..'\n' ..'
          \n' --end ct.main=ct.main..'
          \n' ..'
          \n' end ct.main=ct.main..'
          '..(pg or '')..'
          ' ..'\n' ..'\n' ..'\n\n' ..' \n' ctt={} for i=pageIndex*PAGE_COUNT+1,math.min(#a,(pageIndex+1)*PAGE_COUNT) do v=a[i] bg=v.drops>0 and ' drops' or v.scrambles>0 and ' scrambles' or '' table.insert(ctt, '\n' ..'
          '..#a..' 件中 '..math.max(1,pageIndex*PAGE_COUNT+1)..' - '..math.min(#a,(pageIndex+1)*PAGE_COUNT)..' 件
          日付\n' ..' タイトル\n' ..' サービス\n' ..' 結果\n' ..' D\n' ..' S\n' ..'
          '..FormatTimeAndDuration(v.startTime, v.durationSecond) ..'\n '..ConvertTitle(v.title) ..'\n '..v.serviceName ..'\n '..v.comment ..'\n Drop:'..v.drops ..'\n Scrambles:'..v.scrambles ..'\n') end ct.main=ct.main..table.concat(ctt)..'
          \n
          \n'..(pg or '')..'
          ' 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'))