From 6f67bf0c97076d89f2c6a5e3e58149db301c1c07 Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 22 Nov 2019 11:48:10 +0000 Subject: correctly detect when a track has tags (lastfm) --- modules/lastfm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/lastfm.py b/modules/lastfm.py index 756f1f49..8bf7ebef 100644 --- a/modules/lastfm.py +++ b/modules/lastfm.py @@ -75,7 +75,7 @@ class Module(ModuleManager.BaseModule): track = info_page.data.get("track", {}) tags_str = "" - if "toptags" in track: + if "toptags" in track and track["toptags"]["tag"]: tags = [t["name"] for t in track["toptags"]["tag"]] tags_str = " [%s]" % ", ".join(tags) -- cgit v1.3.1-10-gc9f91