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

設定/基本設定

]=]) commonIni='Common.ini' viewAppIni='ViewApp.ini' function GetViewAppCmdOpt() return { bon=edcb.GetPrivateProfile('APP_CMD_OPT','Bon','-d',viewAppIni), min=edcb.GetPrivateProfile('APP_CMD_OPT','Min','-min',viewAppIni), viewOff=edcb.GetPrivateProfile('APP_CMD_OPT','ViewOff','-noview',viewAppIni), onid=edcb.GetPrivateProfile('APP_CMD_OPT','ONID','-nid',viewAppIni), tsid=edcb.GetPrivateProfile('APP_CMD_OPT','TSID','-tsid',viewAppIni), sid=edcb.GetPrivateProfile('APP_CMD_OPT','SID','-sid',viewAppIni), } end defaultRecExePath=EdcbModulePath()..'\\EpgDataCap_Bon.exe' post=AssertPost() if post and not ALLOW_SETTING then post=nil ct:Append('
変更は許可されていません
\n') end if post then item=mg.get_var(post,'dataSavePath') or '' if item:upper()==(EdcbModulePath()..'\\Setting'):upper() then --既定値なので記録しない edcb.WritePrivateProfile('SET','DataSavePath',nil,commonIni) elseif item:find('^[^%c*?"<>|]+$') then ff=edcb.FindFile(item,1) if ff and ff[1].isdir then edcb.WritePrivateProfile('SET','DataSavePath',item,commonIni) end end item=mg.get_var(post,'recExePath') or '' if item:upper()==defaultRecExePath:upper() then --既定値なので記録しない edcb.WritePrivateProfile('SET','RecExePath',nil,commonIni) elseif item:find('^[^%c*?"<>|]+$') then ff=edcb.FindFile(item,1) if ff and not ff[1].isdir then edcb.WritePrivateProfile('SET','RecExePath',item,commonIni) end end item=mg.get_var(post,'recInfoFolder') or '' if item=='' then --既定値なので記録しない edcb.WritePrivateProfile('SET','RecInfoFolder',nil,commonIni) elseif item:find('^[^%c*?"<>|]+$') then ff=edcb.FindFile(item,1) if ff and ff[1].isdir then edcb.WritePrivateProfile('SET','RecInfoFolder',item,commonIni) end end cmdOpt=GetViewAppCmdOpt() item=mg.get_var(post,'cmdOptBon') or '' if item~=cmdOpt.bon and not item:find('%c') then edcb.WritePrivateProfile('APP_CMD_OPT','Bon',item,viewAppIni) end item=mg.get_var(post,'cmdOptMin') or '' if item~=cmdOpt.min and not item:find('%c') then edcb.WritePrivateProfile('APP_CMD_OPT','Min',item,viewAppIni) end item=mg.get_var(post,'cmdOptViewOff') or '' if item~=cmdOpt.viewOff and not item:find('%c') then edcb.WritePrivateProfile('APP_CMD_OPT','ViewOff',item,viewAppIni) end item=mg.get_var(post,'cmdOptONID') or '' if item~=cmdOpt.onid and not item:find('%c') then edcb.WritePrivateProfile('APP_CMD_OPT','ONID',item,viewAppIni) end item=mg.get_var(post,'cmdOptTSID') or '' if item~=cmdOpt.tsid and not item:find('%c') then edcb.WritePrivateProfile('APP_CMD_OPT','TSID',item,viewAppIni) end item=mg.get_var(post,'cmdOptSID') or '' if item~=cmdOpt.sid and not item:find('%c') then edcb.WritePrivateProfile('APP_CMD_OPT','SID',item,viewAppIni) end ct:Append('
変更しました
\n') edcb.ReloadSetting(false) end edcb.htmlEscape=15 dataSavePath=EdcbSettingPath() recExePath=edcb.GetPrivateProfile('SET','RecExePath',defaultRecExePath,commonIni) recInfoFolder=edcb.GetPrivateProfile('SET','RecInfoFolder','',commonIni) cmdOpt=GetViewAppCmdOpt() ct:Append([=[
設定関係保存フォルダ

録画用アプリのexe

コマンドライン引数 {BonDriver}
最小化
非視聴時
{ONID}
{TSID}
{SID}
録画情報保存フォルダ (※未指定時は録画ファイルと同じ場所に保存します。)

]=]) 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'))