-- vim:set ft=lua: dofile(mg.script_name:gsub('[^\\/]*$','')..'util.lua') ct=CreateContentBuilder(GZIP_THRESHOLD_BYTE) ct:Append([=[ 設定/BonDriver - EDCB

設定/BonDriver

]=]) srvIni='EpgTimerSrv.ini' function GetItemList() local esc=edcb.htmlEscape edcb.htmlEscape=0 local pattern=EdcbSettingPath()..'\\*.ChSet4.txt' edcb.htmlEscape=esc local ret={} for i,v in ipairs(edcb.FindFile(pattern,0) or {}) do if not v.isdir then local bon=v.name local depth=0 while bon~='' do if bon:find('%)$') then depth=depth+1 elseif bon:find('%($') and depth>0 then depth=depth-1 if depth==0 then bon=bon:sub(0,#bon-1) break end end bon=bon:sub(0,#bon-1) end if bon~='' then bon=bon..'.dll' for j,w in ipairs(ret) do if w.bon:upper()==bon:upper() then bon=nil break end end if bon then local epgCount=0 if edcb.GetPrivateProfile(bon,'GetEpg',1,srvIni)~='0' then epgCount=tonumber(edcb.GetPrivateProfile(bon,'EPGCount',0,srvIni)) or 0 if epgCount==0 then epgCount=100 end end ret[#ret+1]={ bon=bon, count=tonumber(edcb.GetPrivateProfile(bon,'Count',0,srvIni)) or 0, epgCount=epgCount } end end end end local priority={} for i,v in ipairs(ret) do priority[i]=tonumber(edcb.GetPrivateProfile(v.bon,'Priority',0xFFFF,srvIni)) or 0xFFFF end for i=2,#priority do for j=2,#priority do if priority[j]変更は許可されていません
\n') end if post then itemList=GetItemList() item=mg.get_var(post,'item') or '' for i,v in ipairs(itemList) do if v.bon==item then if mg.get_var(post,'count') then v.count=GetVarInt(post,'count',0,99) or 0 v.epgCount=GetVarInt(post,'epgCount',0,100) or 0 ct:Append('
変更しました
\n') elseif mg.get_var(post,'up') and i>1 then table.remove(itemList,i) table.insert(itemList,i-1,v) ct:Append('
移動しました
\n') elseif mg.get_var(post,'down') and i<#itemList then table.remove(itemList,i) table.insert(itemList,i+1,v) ct:Append('
移動しました
\n') end break end end for i,v in ipairs(itemList) do edcb.WritePrivateProfile(v.bon,'Count',v.count,srvIni) edcb.WritePrivateProfile(v.bon,'GetEpg',v.epgCount~=0,srvIni) edcb.WritePrivateProfile(v.bon,'EPGCount',v.epgCount%100,srvIni) edcb.WritePrivateProfile(v.bon,'Priority',i-1,srvIni) end end edcb.htmlEscape=15 for i,v in ipairs(GetItemList()) do ct:Append([=[
]=]..v.bon..[=[
チューナー数 EPG取得に使用する数
]=]) end ct:Append([=[ ※上にあるBonDriverから優先的に使用します。
※設定は次回起動時に適用されます。 ]=]) 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'))