better(probably) playlist display
This commit is contained in:
parent
434a109726
commit
ed408fb7e9
20
iptv.lua
20
iptv.lua
@ -310,15 +310,6 @@ function filterpls()
|
|||||||
cursor=0
|
cursor=0
|
||||||
end
|
end
|
||||||
|
|
||||||
function formatentry(v)
|
|
||||||
local t
|
|
||||||
t=v.title or ""
|
|
||||||
if v.current then
|
|
||||||
t = "*"..t
|
|
||||||
end
|
|
||||||
return t
|
|
||||||
end
|
|
||||||
|
|
||||||
function play()
|
function play()
|
||||||
-- mp.commandv("playlist-move", wndstart+cursor, 1)
|
-- mp.commandv("playlist-move", wndstart+cursor, 1)
|
||||||
-- mp.commandv("playlist-clear")
|
-- mp.commandv("playlist-clear")
|
||||||
@ -359,11 +350,16 @@ function showplaylist()
|
|||||||
|
|
||||||
msg=""
|
msg=""
|
||||||
i = wndstart
|
i = wndstart
|
||||||
|
local prefix
|
||||||
while plsfiltered[i] and i<=wndstart+window-1 do
|
while plsfiltered[i] and i<=wndstart+window-1 do
|
||||||
if i==wndstart+cursor then
|
if pls[plsfiltered[i]].current then
|
||||||
msg = msg..">"
|
prefix="*"
|
||||||
|
elseif i==wndstart+cursor then
|
||||||
|
prefix=">"
|
||||||
|
else
|
||||||
|
prefix=" "
|
||||||
end
|
end
|
||||||
msg = msg..formatentry(pls[plsfiltered[i]]).."\n"
|
msg = msg..prefix..(pls[plsfiltered[i]].title or "").."\n"
|
||||||
i=i+1
|
i=i+1
|
||||||
end
|
end
|
||||||
if wndstart>1 then
|
if wndstart>1 then
|
||||||
|
Loading…
Reference in New Issue
Block a user