- local args = args or {}
- local timeout = args.timeout or 2
- local password = args.password or ""
- local host = args.host or "127.0.0.1"
- local port = args.port or "6600"
- local music_dir = args.music_dir or os.getenv("HOME") .. "/Music"
- local cover_size = args.cover_size or 100
- local default_art = args.default_art or ""
- local notify = args.notify or "on"
- local followmouse = args.followmouse or false
- local echo_cmd = args.echo_cmd or "echo"
- local settings = args.settings or function() end
-
- local mpdcover = helpers.scripts_dir .. "mpdcover"
- local mpdh = "telnet://" .. host .. ":" .. port
- local echo = echo_cmd .. " 'password " .. password .. "\nstatus\ncurrentsong\nclose'"
-
- mpd.widget = wibox.widget.textbox('')
+ local args = args or {}
+ local timeout = args.timeout or 2
+ local password = args.password or ""
+ local host = args.host or "127.0.0.1"
+ local port = args.port or "6600"
+ local music_dir = args.music_dir or os.getenv("HOME") .. "/Music"
+ local cover_pattern = args.cover_pattern or "*\\.(jpg|jpeg|png|gif)$"
+ local cover_size = args.cover_size or 100
+ local default_art = args.default_art or ""
+ local notify = args.notify or "on"
+ local followtag = args.followtag or false
+ local echo_cmd = args.echo_cmd or "echo"
+ local settings = args.settings or function() end
+
+ local mpdh = string.format("telnet://%s:%s", host, port)
+ local echo = string.format("%s 'password %s\nstatus\ncurrentsong\nclose'", echo_cmd, password)