From 6d060b20429a1a2334404b63276b15398ad429a3 Mon Sep 17 00:00:00 2001 From: Krateng Date: Thu, 4 Apr 2019 20:15:48 +0200 Subject: [PATCH] Removed superfluous rank calculation on module generation b/c 752832d --- htmlmodules.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/htmlmodules.py b/htmlmodules.py index e0685b6..5234c98 100644 --- a/htmlmodules.py +++ b/htmlmodules.py @@ -347,7 +347,7 @@ def module_artistcharts_tiles(**kwargs): bigpart = [0,1,2,6,15] smallpart = [0,1,2,4,6,9,12,15] - rnk = (0,0) #temporary store so entries with the same scrobble amount get the same rank + #rnk = (0,0) #temporary store so entries with the same scrobble amount get the same rank html = """""" @@ -363,9 +363,9 @@ def module_artistcharts_tiles(**kwargs): if e is not None: - rank = i if e["scrobbles"] != rnk[1] else rnk[0] - rnk = (rank,e["scrobbles"]) - rank = "#" + str(rank) + #rank = i if e["scrobbles"] != rnk[1] else rnk[0] + #rnk = (rank,e["scrobbles"]) + rank = "#" + str(e["rank"]) #image = "/image?artist=" + urllib.parse.quote(e["artist"]) image = getArtistImage(e["artist"],fast=True) link = artistLink(e["artist"]) @@ -402,7 +402,7 @@ def module_trackcharts_tiles(**kwargs): bigpart = [0,1,2,6,15] smallpart = [0,1,2,4,6,9,12,15] - rnk = (0,0) #temporary store so entries with the same scrobble amount get the same rank + #rnk = (0,0) #temporary store so entries with the same scrobble amount get the same rank html = """
""" @@ -419,9 +419,9 @@ def module_trackcharts_tiles(**kwargs): if e is not None: - rank = i if e["scrobbles"] != rnk[1] else rnk[0] - rnk = (rank,e["scrobbles"]) - rank = "#" + str(rank) + #rank = i if e["scrobbles"] != rnk[1] else rnk[0] + #rnk = (rank,e["scrobbles"]) + rank = "#" + str(e["rank"]) #image = "/image?title=" + urllib.parse.quote(e["track"]["title"]) + "&" + "&".join(["artist=" + urllib.parse.quote(a) for a in e["track"]["artists"]]) image = getTrackImage(e["track"]["artists"],e["track"]["title"],fast=True) link = trackLink(e["track"])