-- Copyright 2025 David Vazgenovich Shakaryan local utils = require('mp.utils') mp.register_script_message('download-image', function(target, name, url, path) if utils.file_info(path) then return end local cmd = 'curl -sSfLo \'' .. path .. '\'' .. ' \'' .. url .. '\'' print('exec: ' .. cmd) local ret = os.execute(cmd) if ret == 0 then mp.commandv('script-message-to', target, name, url, path) end end)