From 912d668ea892285c142b52534177f70fe2a7ba28 Mon Sep 17 00:00:00 2001 From: Ricardo Constantino Date: Mon, 17 Oct 2016 18:30:34 +0100 Subject: 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\r to work, which does not in OSC's way of showing messages. --- player/lua/osc.lua | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'player') 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 -- cgit v1.2.3