From 4311d86a7112cde11c3830ea0a0550d81df2feba Mon Sep 17 00:00:00 2001 From: jesopo Date: Sat, 10 Jul 2021 16:57:59 +0000 Subject: [PATCH] handle lastfm tracks only having 1 tag --- modules/lastfm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/lastfm.py b/modules/lastfm.py index 6931e0c0..a11c0d93 100644 --- a/modules/lastfm.py +++ b/modules/lastfm.py @@ -82,7 +82,10 @@ class Module(ModuleManager.BaseModule): tags_str = "" if "toptags" in track and track["toptags"]["tag"]: - tags = [t["name"] for t in track["toptags"]["tag"]] + tags_list = track["toptags"]["tag"] + if not type(tags_list) == list: + tags_list = [tags_list] + tags = [t["name"] for t in tags_list] tags_str = " [%s]" % ", ".join(tags) play_count_str = ""