From: xentec Date: Tue, 22 Sep 2015 01:54:59 +0000 (+0200) Subject: added name attribute to mpd widget X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/168b20afce0581defe7b07588e609b7cdb1af36b?ds=sidebyside;hp=--cc added name attribute to mpd widget Metadata from some extern sources (e.g. soundcloud) is not parsed properly to a ``title`` by mpd so the ``name`` attribute is set instead. --- 168b20afce0581defe7b07588e609b7cdb1af36b diff --git a/widgets/mpd.lua b/widgets/mpd.lua index 5af898b..c437347 100644 --- a/widgets/mpd.lua +++ b/widgets/mpd.lua @@ -71,6 +71,7 @@ local function worker(args) for k, v in string.gmatch(line, "([%w]+):[%s](.*)$") do if k == "state" then mpd_now.state = v elseif k == "file" then mpd_now.file = v + elseif k == "Name" then mpd_now.name = escape_f(v) elseif k == "Artist" then mpd_now.artist = escape_f(v) elseif k == "Title" then mpd_now.title = escape_f(v) elseif k == "Album" then mpd_now.album = escape_f(v)