scripting (lua/js): utils.getpid: make wrapper of pid property
We now have at least 3 scripting APIs which are trivial wrappers around properties: mp.get_mouse_pos, utils.getcwd, utils.getpid. After some discussion on IRC it was decided that it's easier for us to maintain them as trivial wrappers than to deprecate them and inflict pain on users and script authors, so currently no plan to deprecate.
This commit is contained in:
1 parent
f3b2ea9de5
commit
02fbdf8aaf
4 files changed
+5
-16
No files matched your search
@@ -747,6 +747,10 @@ function mp_utils.getcwd()
|
||||
return mp.get_property("working-directory")
|
||||
end
|
||||
|
||||
function mp_utils.getpid()
|
||||
return mp.get_property_number("pid")
|
||||
end
|
||||
|
||||
function mp_utils.format_bytes_humanized(b)
|
||||
local d = {"Bytes", "KiB", "MiB", "GiB", "TiB", "PiB"}
|
||||
local i = 1
|
||||
|
||||
Reference in new issue
Block a user