プログラム予約 条件変更
\n- \n'
..'
- プリセット
- \n' ..' \n' ..'
- 条件
- \n' ..' \n') if aa.dataID~=0 then ct:Append('
- -
- \n' ..' \n') end ct:Append('
-- vim:set ft=lua: dofile(mg.script_name:gsub('[^\\/]*$','')..'util.lua') function AddOrChange(dataID,post) local aa={dataID=dataID} local found=nil local presetID=GetVarInt(post,'presetID',0,65534) if presetID then found=BinarySearch(edcb.EnumRecPresetInfo(),{id=presetID},CompareFields('id')) elseif dataID~=0 then found=BinarySearch(edcb.EnumManuAdd(),aa,CompareFields('dataID')) end if found then local useMargin=GetVarInt(post,'useDefMarginFlag')~=1 or nil aa.recSetting={ batFilePath=found.recSetting.batFilePath, recFolderList=found.recSetting.recFolderList, partialRecFolder=found.recSetting.partialRecFolder, recMode=GetVarInt(post,'recEnabled')~=1 and 5 or GetVarInt(post,'recMode',0,4), noRecMode=GetVarInt(post,'recMode',0,4), tuijyuuFlag=GetVarInt(post,'tuijyuuFlag')==1, priority=GetVarInt(post,'priority',1,5), pittariFlag=GetVarInt(post,'pittariFlag')==1, suspendMode=GetVarInt(post,'suspendMode',0,4), rebootFlag=GetVarInt(post,'rebootFlag')==1, startMargin=useMargin and GetVarInt(post,'startMargin',-6*3600,6*3600), endMargin=useMargin and GetVarInt(post,'endMargin',-6*3600,6*3600), serviceMode=GetVarInt(post,'serviceMode')==1 and 0 or 1+16*(GetVarInt(post,'serviceMode_1',0,1) or 0)+32*(GetVarInt(post,'serviceMode_2',0,1) or 0), continueRecFlag=GetVarInt(post,'continueRecFlag')==1, tunerID=GetVarInt(post,'tunerID'), partialRecFlag=GetVarInt(post,'partialRecFlag',0,1) or 0 } if aa.recSetting.recMode and aa.recSetting.priority and aa.recSetting.suspendMode and (not useMargin or aa.recSetting.startMargin and aa.recSetting.endMargin) and aa.recSetting.tunerID then aa.dayOfWeekFlag=0 for i=7,1,-1 do aa.dayOfWeekFlag=aa.dayOfWeekFlag*2+(GetVarInt(post,'checkDayOfWeek'..i)==1 and 1 or 0) end aa.startTime=(GetVarInt(post,'startHour',0,23) or 0)*3600+(GetVarInt(post,'startMin',0,59) or 0)*60+(GetVarInt(post,'startSec',0,59) or 0) aa.durationSecond=((GetVarInt(post,'endHour',0,23) or 0)*3600+(GetVarInt(post,'endMin',0,59) or 0)*60+(GetVarInt(post,'endSec',0,59) or 0)+24*3600-aa.startTime)%(24*3600) aa.onid,aa.tsid,aa.sid=GetVarServiceID(post,'serviceID') if aa.onid then local chInfo=BinarySearch(edcb.GetChDataList(),aa,CompareFields('onid',false,'tsid',false,'sid')) if chInfo then aa.stationName=chInfo.serviceName --制御文字は消す aa.title=(mg.get_var(post,'title') or ''):gsub('%c','') return edcb.AddOrChgManuAdd(aa) end end end end return false end ct=CreateContentBuilder(GZIP_THRESHOLD_BYTE) ct:Append(DOCTYPE_HTML4_STRICT..[=[