Commit 26e83d54 authored by Pierre Ynard's avatar Pierre Ynard

httprequests.lua: use proper binding to get current stream length

... instead of the "length" object variable.

Ref #17285
parent e9a77591
......@@ -456,7 +456,6 @@ getstatus = function (includecategories)
s.volume=vlc.volume.get()
if input then
s.length=math.floor(vlc.var.get(input,"length") / 1000000)
s.time=math.floor(vlc.var.get(input,"time") / 1000000)
s.position=vlc.var.get(input,"position")
s.currentplid=vlc.playlist.current()
......@@ -464,7 +463,6 @@ getstatus = function (includecategories)
s.rate=vlc.var.get(input,"rate")
s.subtitledelay=vlc.var.get(input,"spu-delay") / 1000000
else
s.length=0
s.time=0
s.position=0
s.currentplid=-1
......@@ -473,6 +471,12 @@ getstatus = function (includecategories)
s.subtitledelay=0
end
if item then
s.length=math.floor(item:duration())
else
s.length=0
end
if vout then
s.fullscreen=vlc.var.get(vout,"fullscreen")
s.aspectratio=vlc.var.get(vout,"aspect-ratio");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment