Don't show lastfm play count if it is 0
This commit is contained in:
parent
948c86adbc
commit
e77d681d7d
1 changed files with 2 additions and 1 deletions
|
@ -68,7 +68,8 @@ class Module(ModuleManager.BaseModule):
|
|||
tags = ""
|
||||
|
||||
play_count = ""
|
||||
if "userplaycount" in info_page.data.get("track", []):
|
||||
if ("userplaycount" in info_page.data.get("track", {}) and
|
||||
info_page.data["track"]["userplaycount"] > 0):
|
||||
play_count = int(info_page.data["track"]["userplaycount"])
|
||||
play_count = " (%d play%s)" % (play_count,
|
||||
"s" if play_count > 1 else "")
|
||||
|
|
Loading…
Reference in a new issue