1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Merged master changes

This commit is contained in:
Krateng
2019-06-13 12:22:02 +02:00
23 changed files with 201 additions and 182 deletions

View File

@@ -375,6 +375,12 @@ a.bronze {
img.certrecord {
height:30px;
vertical-align: text-bottom;
}
/*
**
**
@@ -463,12 +469,16 @@ table.list td.icon div {
background-position:center;
}
table.list td.artists,td.artist,td.title {
table.list td.artists,td.artist,td.title,td.track {
min-width:100px;
}
table.list td.track span.artist_in_trackcolumn {
color:#bbb;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

2
website/robots.txt Normal file
View File

@@ -0,0 +1,2 @@
User-agent: *
Disallow: /api/

View File

@@ -15,7 +15,7 @@
</td>
<td class="text">
<span>KEY_ARTISTS</span><br/>
<h1>KEY_TRACKTITLE</h1> <span class="rank"><a href="/charts_tracks?max=100">KEY_POSITION</a></span>
<h1>KEY_TRACKTITLE</h1> KEY_CERTS <span class="rank"><a href="/charts_tracks?max=100">KEY_POSITION</a></span>
<p class="stats"><a href="/scrobbles?KEY_SCROBBLELINK">KEY_SCROBBLES Scrobbles</a></p>

View File

@@ -16,11 +16,14 @@ def instructions(keys):
imgurl = getTrackImage(track["artists"],track["title"],fast=True)
pushresources = [{"file":imgurl,"type":"image"}] if imgurl.startswith("/") else []
data = database.trackInfo(track["artists"],track["title"])
data = database.trackInfo(track)
scrobblesnum = str(data["scrobbles"])
pos = "#" + str(data["position"])
html_cert = ""
if data["certification"] is not None:
html_cert = "<img class='certrecord' src='/media/record_{cert}.png' title='This track has reached {certc} status' />".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,