\n')
info=nil
for i,v in ipairs(xlist) do
for j,w in ipairs(edcb.FindFile(PathAppend(dir,'*'..v),0) or {}) do
if not w.isdir and mg.md5(w.name)==hash then
info=w
info.ists=v==tsx
break
end
end
if info then
break
end
end
edcb.htmlEscape=15
if info then
ref=dirname..'/'..info.name
queryParent='?i='..index..(dirhash and '&d='..dirhash or '')
if vtag==1 then
ct:Append(VideoWrapperBegin()
..''..VideoWrapperEnd()..'\n'..VideoScriptTemplate())
else
ct:Append('/'..EdcbHtmlEscape(ref)
..'\n[DL]')
end
if info.ists then
fsec,fsize=0,0
f=edcb.io.open(PathAppend(dir,info.name),'rb')
if f then
fsec,fsize=GetDurationSec(f)
f:close()
end
ct:Append(' ('..('%dm%02ds|'):format(math.floor(fsec/60),fsec%60)..math.floor(fsize/1048576)..'M)
\n'
..'')
if vtag==10 then
src='xcode.lua?fname='..mg.url_encode(ref)..ConstructTranscodeQueries(xq)
ct:Append('\n'..VideoWrapperBegin()
..(xq.tslive and '' or
'')
..VideoWrapperEnd()..'\n'
..'\n'..TranscodeScriptTemplate(false,xq.caption,xq.jikkyo,{ofssec=fsec*(xq.offset or 0)/100,fast=xq.fast}))
if xq.tslive then
ct:Append(TsliveScriptTemplate())
elseif ALLOW_HLS then
ct:Append(HlsScriptTemplate('xcode.lua'))
end
end
else
ct:Append((vtag~=1 and '\n[Mux-to-TS]' or '')
..' ('..math.floor(info.size/1048576)..'M)
\n')
end
end
ct:Append('
\n')
end
end
ct:Append([=[