aboutsummaryrefslogtreecommitdiff
path: root/plugins/degesch
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2016-01-18 01:28:53 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2016-01-18 01:28:53 +0100
commit2ec6258ff38747b72f55a0d19370dd5841e3be02 (patch)
tree1225d8fdb2e3b6d17c34e94bd015e911267dfc65 /plugins/degesch
parentf57664ddd0ad29ee60e8218f210a3b4ace494da5 (diff)
downloadxK-2ec6258ff38747b72f55a0d19370dd5841e3be02.tar.gz
xK-2ec6258ff38747b72f55a0d19370dd5841e3be02.tar.xz
xK-2ec6258ff38747b72f55a0d19370dd5841e3be02.zip
last-fm.lua: don't use empty album names
Diffstat (limited to 'plugins/degesch')
-rw-r--r--plugins/degesch/last-fm.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/degesch/last-fm.lua b/plugins/degesch/last-fm.lua
index 20843e6..5c836ca 100644
--- a/plugins/degesch/last-fm.lua
+++ b/plugins/degesch/last-fm.lua
@@ -61,8 +61,8 @@ local process = function (buffer, data, action)
-- Need to make some sense of the XML automatically converted to JSON
local text_of = function (node)
- if type (node) == "table" then return node["#text"] end
- return node
+ if type (node) ~= "table" then return node end
+ return node["#text"] ~= "" and node["#text"] or nil
end
local name, artist, album