Commit 60a57b83 authored by Antoine Cellerier's avatar Antoine Cellerier

Misc lua interface changes.

parent abfa2cef
...@@ -5,7 +5,8 @@ This is the `dummy' VLC Lua interface module. ...@@ -5,7 +5,8 @@ This is the `dummy' VLC Lua interface module.
Please specify a VLC Lua interface to load with the --lua-intf option. Please specify a VLC Lua interface to load with the --lua-intf option.
VLC Lua interface modules include: `rc', `telnet' and `http'. VLC Lua interface modules include: `rc', `telnet' and `http'.
For example: vlc -I lua --lua-intf rc For example: vlc -I lua --lua-intf rc
You can also use the alternate syntax: vlc -I "lua{intf=rc}"]] You can also use the alternate syntax: vlc -I "lua{intf=rc}"
See share/lua/intf/README.txt for more information about lua interface modules.]]
for line in string.gmatch(msg,"([^\n]+)\n*") do for line in string.gmatch(msg,"([^\n]+)\n*") do
vlc.msg.err(line) vlc.msg.err(line)
......
...@@ -220,7 +220,7 @@ end ...@@ -220,7 +220,7 @@ end
function parse_url_request(request) function parse_url_request(request)
if not request then return {} end if not request then return {} end
t = {} local t = {}
for k,v in string.gmatch(request,"([^=&]+)=?([^=&]*)") do for k,v in string.gmatch(request,"([^=&]+)=?([^=&]*)") do
local k_ = vlc.strings.decode_uri(k) local k_ = vlc.strings.decode_uri(k)
local v_ = vlc.strings.decode_uri(v) local v_ = vlc.strings.decode_uri(v)
......
...@@ -87,7 +87,7 @@ function set_env(name,client,value) ...@@ -87,7 +87,7 @@ function set_env(name,client,value)
if value then if value then
local var,val = split_input(value) local var,val = split_input(value)
if val then if val then
s = string.gsub(val,"\"(.*)\"","%1") local s = string.gsub(val,"\"(.*)\"","%1")
if type(client.env[var])==type(1) then if type(client.env[var])==type(1) then
client.env[var] = tonumber(s) client.env[var] = tonumber(s)
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment