mirror of https://github.com/lcpz/lain.git
Added keys to mpd_now for querying the length of a song and the current time (both in seconds).
This commit is contained in:
parent
b2d2d6117e
commit
7939cfcd90
|
@ -58,7 +58,9 @@ local function worker(args)
|
|||
artist = "N/A",
|
||||
title = "N/A",
|
||||
album = "N/A",
|
||||
date = "N/A"
|
||||
date = "N/A",
|
||||
time = "N/A",
|
||||
elapsed= "N/A"
|
||||
}
|
||||
|
||||
for line in f:lines() do
|
||||
|
@ -69,6 +71,8 @@ local function worker(args)
|
|||
elseif k == "Title" then mpd_now.title = escape_f(v)
|
||||
elseif k == "Album" then mpd_now.album = escape_f(v)
|
||||
elseif k == "Date" then mpd_now.date = escape_f(v)
|
||||
elseif k == "Time" then mpd_now.time = v
|
||||
elseif k == "elapsed"then mpd_now.elapsed= math.floor(v)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue