mirror of
https://github.com/mpv-player/mpv
synced 2025-03-23 03:37:27 +00:00
stats: proper usage of imported module
and comment nitpicking
This commit is contained in:
parent
0bf4b0d18a
commit
d88adcfbc7
@ -10,15 +10,15 @@
|
|||||||
-- Please note: not every property is always available and therefore not always
|
-- Please note: not every property is always available and therefore not always
|
||||||
-- visible.
|
-- visible.
|
||||||
|
|
||||||
require 'mp.options'
|
local options = require 'mp.options'
|
||||||
|
|
||||||
-- options
|
-- Options
|
||||||
local o = {
|
local o = {
|
||||||
ass_formatting = true,
|
ass_formatting = true,
|
||||||
duration = 3,
|
duration = 3,
|
||||||
debug = false,
|
debug = false,
|
||||||
|
|
||||||
-- text style
|
-- Text style
|
||||||
font = "Source Sans Pro",
|
font = "Source Sans Pro",
|
||||||
font_size = 11,
|
font_size = 11,
|
||||||
font_color = "FFFFFF",
|
font_color = "FFFFFF",
|
||||||
@ -34,21 +34,21 @@ local o = {
|
|||||||
-- use this string instead.
|
-- use this string instead.
|
||||||
custom_header = "",
|
custom_header = "",
|
||||||
|
|
||||||
-- text formatting
|
-- Text formatting
|
||||||
-- with ASS
|
-- With ASS
|
||||||
nl = "\\N",
|
nl = "\\N",
|
||||||
prop_indent = "\\h\\h\\h\\h\\h",
|
prop_indent = "\\h\\h\\h\\h\\h",
|
||||||
kv_sep = "\\h\\h",
|
kv_sep = "\\h\\h",
|
||||||
b1 = "{\\b1}",
|
b1 = "{\\b1}",
|
||||||
b0 = "{\\b0}",
|
b0 = "{\\b0}",
|
||||||
-- without ASS
|
-- Without ASS
|
||||||
no_ass_nl = "\n",
|
no_ass_nl = "\n",
|
||||||
no_ass_prop_indent = "\t",
|
no_ass_prop_indent = "\t",
|
||||||
no_ass_kv_sep = " ",
|
no_ass_kv_sep = " ",
|
||||||
no_ass_b1 = "",
|
no_ass_b1 = "",
|
||||||
no_ass_b0 = "",
|
no_ass_b0 = "",
|
||||||
}
|
}
|
||||||
read_options(o)
|
options.read_options(o)
|
||||||
|
|
||||||
|
|
||||||
function main()
|
function main()
|
||||||
@ -166,7 +166,7 @@ function append_property(s, sec, prop, prefix, suffix)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- one could merge this into append_property, it's just a bit more verbose this way imo
|
-- One could merge this into append_property, it's just a bit more verbose this way imo
|
||||||
function append_property_inline(s, sec, prop, prefix, suffix, no_prefix_markup, no_prefix_sep, no_indent)
|
function append_property_inline(s, sec, prop, prefix, suffix, no_prefix_markup, no_prefix_sep, no_indent)
|
||||||
local ret = mp.get_property_osd(prop)
|
local ret = mp.get_property_osd(prop)
|
||||||
if ret == nil or ret == "" then
|
if ret == nil or ret == "" then
|
||||||
|
Loading…
Reference in New Issue
Block a user