aboutsummaryrefslogtreecommitdiff
path: root/widgets
diff options
context:
space:
mode:
authorAdrian C. (anrxc) <anrxc@sysphere.org>2013-11-09 23:52:43 +0100
committerAdrian C. (anrxc) <anrxc@sysphere.org>2013-11-09 23:52:43 +0100
commit75cd1039cfa33f502485c6a7f70be747213bfe84 (patch)
treece8a02fbd3653d938eb246d2d9e542a1b5043f21 /widgets
parenta6a73f47d6be78e083e96829efa3f03752f3f539 (diff)
downloadvicious-legacy-75cd1039cfa33f502485c6a7f70be747213bfe84.tar.xz
Revert "mpd: workaround command termination bug in mpd server v0.18"
This reverts commit a6a73f47, because the issue was solved in mpd release 0.18.2. I imported the workaround for historical reasons and in case someone gets stuck with version 0.18 on his preferred OS distribution.
Diffstat (limited to 'widgets')
-rw-r--r--widgets/mpd.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/widgets/mpd.lua b/widgets/mpd.lua
index b8d08df..e4bcb0b 100644
--- a/widgets/mpd.lua
+++ b/widgets/mpd.lua
@@ -37,11 +37,10 @@ local function worker(format, warg)
-- Construct MPD client options
local mpdh = "telnet://"..host..":"..port
- local echo = '{ echo "password '..pass..'"; echo "status";' ..
- 'echo "currentsong"; sleep .1; echo "close";}'
+ local echo = "echo 'password "..pass.."\nstatus\ncurrentsong\nclose'"
-- Get data from MPD server
- local f = io.popen(echo.." | curl --connect-timeout 1 -fs "..mpdh)
+ local f = io.popen(echo.." | curl --connect-timeout 1 -fsm 3 "..mpdh)
for line in f:lines() do
for k, v in string.gmatch(line, "([%w]+):[%s](.*)$") do