Commit: d26b6960f393ccbe41b0c590cbd5595b6bf5cee9
Parent: 8fa2dc363c032e4e0b5832ffbb51b3dbbe562621
Author: Ren Tatsumoto
Date: Tue, 22 Sep 2020 23:57:50 +0300
'Start/end time has been set' messages are started with a capital letter
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/subs2srs.lua b/subs2srs.lua
@@ -82,6 +82,10 @@ function table.contains(table, element)
return false
end
+local function capitalize_first_letter(string)
+ return string:gsub("^%l", string.upper)
+end
+
local function notify(message, level, duration)
level = level or 'info'
duration = duration or 1
@@ -686,14 +690,13 @@ end
subs.set_timing = function(position)
subs.user_timings[position] = mp.get_property_number('time-pos')
- local time_human = human_readable_time(subs.user_timings[position])
if is_emptytable(subs.list) then
mp.observe_property("sub-text", "string", subs.append)
end
menu.update()
- mp.osd_message(string.format("%s is set to %s.", position, time_human), 2)
+ notify(capitalize_first_letter(position) .. " time has been set.")
end
subs.set_starting_line = function()