diff --git a/database.py b/database.py index e56dee5..65fbc5f 100644 --- a/database.py +++ b/database.py @@ -550,7 +550,7 @@ def trackInfo(track): scrobbles = c["scrobbles"] position = c["rank"] cert = None - threshold_gold, threshold_platinum, threshold_diamond = settings.get_settings("SCROBBLES_GOLD","SCROBBLES_PLATINUM","SCROBBLES_PLATINUM") + threshold_gold, threshold_platinum, threshold_diamond = settings.get_settings("SCROBBLES_GOLD","SCROBBLES_PLATINUM","SCROBBLES_DIAMOND") if scrobbles >= threshold_diamond: cert = "diamond" elif scrobbles >= threshold_platinum: cert = "platinum" elif scrobbles >= threshold_gold: cert = "gold" diff --git a/website/css/maloja.css b/website/css/maloja.css index fe5490e..af9ade7 100644 --- a/website/css/maloja.css +++ b/website/css/maloja.css @@ -375,6 +375,12 @@ a.bronze { +img.certrecord { + height:30px; + vertical-align: text-bottom; +} + + /* ** ** diff --git a/website/media/record_diamond.png b/website/media/record_diamond.png new file mode 100644 index 0000000..0c6b428 Binary files /dev/null and b/website/media/record_diamond.png differ diff --git a/website/media/record_gold.png b/website/media/record_gold.png new file mode 100644 index 0000000..631b31a Binary files /dev/null and b/website/media/record_gold.png differ diff --git a/website/media/record_platinum.png b/website/media/record_platinum.png new file mode 100644 index 0000000..c11f545 Binary files /dev/null and b/website/media/record_platinum.png differ diff --git a/website/track.html b/website/track.html index 5dba077..c657a06 100644 --- a/website/track.html +++ b/website/track.html @@ -15,7 +15,7 @@ KEY_ARTISTS
-

KEY_TRACKTITLE

KEY_POSITION +

KEY_TRACKTITLE

KEY_CERTS KEY_POSITION

KEY_SCROBBLES Scrobbles

diff --git a/website/track.py b/website/track.py index b114ce2..de56107 100644 --- a/website/track.py +++ b/website/track.py @@ -21,6 +21,9 @@ def instructions(keys): scrobblesnum = str(data["scrobbles"]) pos = "#" + str(data["position"]) + html_cert = "" + if data["certification"] is not None: + html_cert = "".format(cert=data["certification"],certc=data["certification"].capitalize()) html_medals = "" if "medals" in data and data["medals"] is not None: @@ -61,6 +64,7 @@ def instructions(keys): "KEY_IMAGEURL":imgurl, "KEY_SCROBBLELINK":compose_querystring(keys), "KEY_MEDALS":html_medals, + "KEY_CERTS":html_cert, "KEY_SCROBBLELIST":html_scrobbles, # pulse "KEY_PULSE_MONTHS":html_pulse_months,