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.
This commit is contained in:
xentec 2015-09-22 03:54:59 +02:00
parent 29983d95b2
commit 168b20afce
1 changed files with 1 additions and 0 deletions

View File

@ -71,6 +71,7 @@ local function worker(args)
for k, v in string.gmatch(line, "([%w]+):[%s](.*)$") do for k, v in string.gmatch(line, "([%w]+):[%s](.*)$") do
if k == "state" then mpd_now.state = v if k == "state" then mpd_now.state = v
elseif k == "file" then mpd_now.file = 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 == "Artist" then mpd_now.artist = escape_f(v)
elseif k == "Title" then mpd_now.title = escape_f(v) elseif k == "Title" then mpd_now.title = escape_f(v)
elseif k == "Album" then mpd_now.album = escape_f(v) elseif k == "Album" then mpd_now.album = escape_f(v)