Add volume to MPD widget (#507)

This commit is contained in:
Sam Price 2021-07-01 14:08:53 -05:00 committed by GitHub
parent 6bf79c30ae
commit 7e814d1411
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -61,7 +61,8 @@ local function factory(args)
track = "N/A", track = "N/A",
date = "N/A", date = "N/A",
time = "N/A", time = "N/A",
elapsed = "N/A" elapsed = "N/A",
volume = "N/A"
} }
for line in string.gmatch(f, "[^\n]+") do for line in string.gmatch(f, "[^\n]+") do
@ -83,6 +84,7 @@ local function factory(args)
elseif k == "single" then mpd_now.single_mode = v ~= "0" elseif k == "single" then mpd_now.single_mode = v ~= "0"
elseif k == "random" then mpd_now.random_mode = v ~= "0" elseif k == "random" then mpd_now.random_mode = v ~= "0"
elseif k == "consume" then mpd_now.consume_mode = v ~= "0" elseif k == "consume" then mpd_now.consume_mode = v ~= "0"
elseif k == "volume" then mpd_now.volume = v
end end
end end
end end