handle lastfm tracks only having 1 tag
This commit is contained in:
parent
b7e1cc96f1
commit
4311d86a71
1 changed files with 4 additions and 1 deletions
|
@ -82,7 +82,10 @@ class Module(ModuleManager.BaseModule):
|
||||||
|
|
||||||
tags_str = ""
|
tags_str = ""
|
||||||
if "toptags" in track and track["toptags"]["tag"]:
|
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)
|
tags_str = " [%s]" % ", ".join(tags)
|
||||||
|
|
||||||
play_count_str = ""
|
play_count_str = ""
|
||||||
|
|
Loading…
Reference in a new issue