summaryrefslogtreecommitdiffstats
path: root/player/lua
diff options
context:
space:
mode:
authorRicardo Constantino <wiiaboo@gmail.com>2016-10-17 18:30:34 +0100
committerRicardo Constantino <wiiaboo@gmail.com>2016-10-17 19:00:17 +0100
commit912d668ea892285c142b52534177f70fe2a7ba28 (patch)
treef9348a459d53075f2c781b88b3d01367149252a0 /player/lua
parentc398ab7520f3dfd9ef1624bd5d06190433182ba1 (diff)
downloadmpv-912d668ea892285c142b52534177f70fe2a7ba28.tar.bz2
mpv-912d668ea892285c142b52534177f70fe2a7ba28.tar.xz
osc: use the same characters as track list for playlist/chapter
Had only tested with luajit which supports the \xHH syntax added in Lua 5.2. The arrow is troublesome to use since the ideal way to use it, as the OSD code uses it, needs \alpha&H00<arrow>\r to work, which does not in OSC's way of showing messages.
Diffstat (limited to 'player/lua')
-rw-r--r--player/lua/osc.lua14
1 files changed, 4 insertions, 10 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua
index 9b2d0c65ad..ff7d9120ed 100644
--- a/player/lua/osc.lua
+++ b/player/lua/osc.lua
@@ -687,9 +687,6 @@ function get_playlist()
return "Empty playlist."
end
- local list_current = "➜\xC2\xA0"
- local list_normal = "\xE2\x80\x83\xC2\xA0"
-
local message = string.format('Playlist: (%d/%d):\n', pos + 1, count)
for i, v in ipairs(limlist) do
local title = v.title
@@ -697,8 +694,8 @@ function get_playlist()
if (title == nil) then
title = filename
end
- message = string.format('%s %s%s\n', message,
- (v.current and list_current or list_normal), title)
+ message = string.format('%s %s %s\n', message,
+ (v.current and '●' or '○'), title)
end
return message
end
@@ -710,9 +707,6 @@ function get_chapterlist()
return "No chapters."
end
- local list_current = "➜\xC2\xA0"
- local list_normal = "\xE2\x80\x83\xC2\xA0"
-
local message = string.format('Chapters: (%d/%d):\n', pos + 1, count)
for i, v in ipairs(limlist) do
local time = mp.format_time(v.time)
@@ -720,8 +714,8 @@ function get_chapterlist()
if (title == nil) then
title = string.format('Chapter %02d', i + 1)
end
- message = string.format('%s[%s] %s%s\n', message, time,
- (v.current and list_current or list_normal), title)
+ message = string.format('%s[%s] %s %s\n', message, time,
+ (v.current and '●' or '○'), title)
end
return message
end