Skip to content

Commit

Permalink
12時間を超える長時間番組に対応
Browse files Browse the repository at this point in the history
  • Loading branch information
EMWUI committed Aug 7, 2021
1 parent da99746 commit 3813627
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions HttpPublic/EMWUI/epg.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@
maxTime=maxTime and os.time(mmt.maxTime)<maxTime and maxTime or os.time(mmt.maxTime)
end
--表示範囲の番組だけ取得する
st[#st].et=edcb.EnumEventInfo({{onid=v.onid, tsid=v.tsid, sid=v.sid}}, {startTime=os.date('!*t',pageTime-6*3600), durationSecond=(interval+6)*3600}) or {}
st[#st].et=edcb.EnumEventInfo({{onid=v.onid, tsid=v.tsid, sid=v.sid}}, {startTime=os.date('!*t',pageTime-24*3600), durationSecond=(interval+24)*3600}) or {}
for j,w in ipairs(edcb.EnumEventInfoArchive and
edcb.EnumEventInfoArchive({{onid=v.onid, tsid=v.tsid, sid=v.sid}}, {startTime=os.date('!*t',pageTime-6*3600), durationSecond=(interval+6)*3600}) or {}) do
edcb.EnumEventInfoArchive({{onid=v.onid, tsid=v.tsid, sid=v.sid}}, {startTime=os.date('!*t',pageTime-24*3600), durationSecond=(interval+24)*3600}) or {}) do
w.past=true
table.insert(st[#st].et, w)
end
Expand Down
2 changes: 1 addition & 1 deletion HttpPublic/EMWUI/onair.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
if (oneseg or not v.partialReceptionFlag) and not v.subCh then
x={eid=0, startTime=os.date('*t',now)}
y=x
b=edcb.EnumEventInfo({{onid=v.onid, tsid=v.tsid, sid=v.sid}}, {startTime=os.date('*t',now-12*3600), durationSecond=24*3600}) or {}
b=edcb.EnumEventInfo({{onid=v.onid, tsid=v.tsid, sid=v.sid}}, {startTime=os.date('*t',now-24*3600), durationSecond=48*3600}) or {}
table.sort(b, function(a,b) return os.time(a.startTime)<os.time(b.startTime) end)
for j,w in ipairs(b) do
if w.startTime then
Expand Down
4 changes: 2 additions & 2 deletions HttpPublic/api/EnumEventInfo
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ if onair then
--放送中
now=os.time()
if not startTime then
startTime=os.date('*t',now-12*3600)
startTime=os.date('*t',now-24*3600)
end
durationSecond=mg.get_var(mg.request_info.query_string,'duration') or 24*3600
durationSecond=mg.get_var(mg.request_info.query_string,'duration') or 48*3600

b=edcb.EnumEventInfo({key},{startTime=startTime, durationSecond=durationSecond})

Expand Down

0 comments on commit 3813627

Please sign in to comment.