Added keys to mpd_now for querying the length of a song and the current time (both in seconds).

This commit is contained in:
Jack Pugmire 2015-01-15 23:44:22 -05:00 committed by copycat-killer
parent b2d2d6117e
commit 7939cfcd90
1 changed files with 5 additions and 1 deletions

View File

@ -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