mirror of
https://github.com/krateng/maloja.git
synced 2025-04-19 10:07:37 +03:00
Added info about record certifications to artist page
This commit is contained in:
parent
b4a6036c0e
commit
09b1fd446b
@ -21,7 +21,7 @@
|
||||
<p class="stats"><a href="/scrobbles?artist=KEY_ENC_ARTISTNAME">KEY_SCROBBLES Scrobbles</a></p>
|
||||
|
||||
<p class="desc">KEY_DESCRIPTION</p>
|
||||
<span>KEY_MEDALS</span>
|
||||
<span>KEY_MEDALS</span> <span>KEY_CERTS</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -5,7 +5,7 @@ from malojatime import today,thisweek,thismonth,thisyear
|
||||
|
||||
def instructions(keys):
|
||||
from utilities import getArtistImage
|
||||
from htmlgenerators import artistLink, artistLinks
|
||||
from htmlgenerators import artistLink, artistLinks, link_address
|
||||
from urihandler import compose_querystring, uri_to_internal
|
||||
from htmlmodules import module_pulse, module_performance, module_trackcharts, module_scrobblelist
|
||||
|
||||
@ -30,6 +30,17 @@ def instructions(keys):
|
||||
for y in data["medals"]["bronze"]:
|
||||
html_medals += "<a title='Third Best Artist in " + str(y) + "' class='hidelink medal shiny bronze' href='/charts_artists?max=50&in=" + str(y) + "'><span>" + str(y) + "</span></a>"
|
||||
|
||||
html_cert = ""
|
||||
for track in database.get_tracks(artist=artist):
|
||||
info = database.trackInfo(track)
|
||||
if info.get("certification") is not None:
|
||||
img = "/media/record_{cert}.png".format(cert=info["certification"])
|
||||
trackname = track["title"].replace("'","'")
|
||||
tracklink = link_address(track)
|
||||
tooltip = "{title} has reached {cert} status".format(title=trackname,cert=info["certification"].capitalize())
|
||||
html_cert += "<a href='{link}'><img class='certrecord_small' src='{img}' title='{tooltip}' /></a>".format(tooltip=tooltip,img=img,link=tracklink)
|
||||
|
||||
|
||||
credited = data.get("replace")
|
||||
includestr = " "
|
||||
if credited is not None:
|
||||
@ -69,6 +80,7 @@ def instructions(keys):
|
||||
"KEY_POSITION":pos,
|
||||
"KEY_ASSOCIATED":includestr,
|
||||
"KEY_MEDALS":html_medals,
|
||||
"KEY_CERTS":html_cert,
|
||||
# tracks
|
||||
"KEY_TRACKLIST":html_tracks,
|
||||
# pulse
|
||||
|
@ -379,6 +379,10 @@ img.certrecord {
|
||||
height:30px;
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
img.certrecord_small {
|
||||
height:20px;
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user