diff options
author | Perry Hargrave <perry.hargrave@gmail.com> | 2011-04-25 18:37:00 +0200 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2011-04-25 21:21:32 +0200 |
commit | 06e8f7c68ae8f880203911b2991c6103803227f9 (patch) | |
tree | edb9260d2f542ee8b069501bd86643a3d685ed6b /widgets | |
parent | 729ceb7865daa55a9cab6d59ef26c3d355ad27dc (diff) | |
download | vicious-legacy-06e8f7c68ae8f880203911b2991c6103803227f9.tar.xz |
mpd: allow named keys or positional arguments
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/mpd.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/widgets/mpd.lua b/widgets/mpd.lua index 0ed0132..143eec9 100644 --- a/widgets/mpd.lua +++ b/widgets/mpd.lua @@ -30,9 +30,9 @@ local function worker(format, warg) } -- Fallback to MPD defaults - local pass = warg and warg[1] or "\"\"" - local host = warg and warg[2] or "127.0.0.1" - local port = warg and warg[3] or "6600" + local pass = warg and (warg.password or warg[1]) or "\"\"" + local host = warg and (warg.host or warg[2]) or "127.0.0.1" + local port = warg and (warg.port or warg[3]) or "6600" -- Construct MPD client options local mpdh = "telnet://"..host..":"..port |