Anyone knows of mpv lua script to log URLs?
I asked AI to make this slop and it just doesn't work as it should
local log_file = io.open("~/.config/mpv/mpv_urls.log", "a")
mp.add_hook("on_load", 50, function()
local path = mp.get_property("path")
if not path or not path:match("^https?://") then
return
end
local timestamp = os.date("%Y-%m-%d %H:%M:%S")
local log_entry = string.format("\n[%s] %s", timestamp, path)
-- Start a new line immediately
log_file:write(log_entry)
Comment too long. Click here to view the full text.