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

Fixed faulty links

This commit is contained in:
Krateng 2019-06-17 15:24:11 +02:00
parent 6958196adb
commit a83f2c3cf0
4 changed files with 9 additions and 8 deletions

View File

@ -249,6 +249,7 @@ def module_artistcharts(page=0,perpage=100,max_=None,**kwargs):
pages = math.ceil(len(artists) / perpage)
# last time range (to compare)
try:
#from malojatime import _get_next

View File

@ -22,13 +22,13 @@ def instructions(keys):
if "medals" in data and data["medals"] is not None:
if "gold" in data["medals"]:
for y in data["medals"]["gold"]:
html_medals += "<a title='Best Artist in " + str(y) + "' class='hidelink medal shiny gold' href='/charts_artists?max=50&in=" + str(y) + "'><span>" + str(y) + "</span></a>"
html_medals += "<a title='Best Artist in " + str(y) + "' class='hidelink medal shiny gold' href='/charts_artists?in=" + str(y) + "'><span>" + str(y) + "</span></a>"
if "silver" in data["medals"]:
for y in data["medals"]["silver"]:
html_medals += "<a title='Second Best Artist in " + str(y) + "' class='hidelink medal shiny silver' href='/charts_artists?max=50&in=" + str(y) + "'><span>" + str(y) + "</span></a>"
html_medals += "<a title='Second Best Artist in " + str(y) + "' class='hidelink medal shiny silver' href='/charts_artists?in=" + str(y) + "'><span>" + str(y) + "</span></a>"
if "bronze" in data["medals"]:
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_medals += "<a title='Third Best Artist in " + str(y) + "' class='hidelink medal shiny bronze' href='/charts_artists?in=" + str(y) + "'><span>" + str(y) + "</span></a>"
html_cert = ""
for track in database.get_tracks(artist=artist):

View File

@ -20,7 +20,7 @@
</div>-->
<h1><a class="stat_link_topartists" href="/charts_artists?max=50&in=alltime">Top Artists</a></h1>
<h1><a class="stat_link_topartists" href="/charts_artists?in=alltime">Top Artists</a></h1>
<!--All Time | This Year | This Month | This Week-->
@ -40,7 +40,7 @@
<h1><a class="stat_link_toptracks" href="/charts_tracks?max=50&in=alltime">Top Tracks</a></h1>
<h1><a class="stat_link_toptracks" href="/charts_tracks?in=alltime">Top Tracks</a></h1>
<span onclick="showRange('toptracks','week')" class="stat_selector_toptracks selector_toptracks_week">This Week</span>

View File

@ -29,13 +29,13 @@ def instructions(keys):
if "medals" in data and data["medals"] is not None:
if "gold" in data["medals"]:
for y in data["medals"]["gold"]:
html_medals += "<a title='Best Track in " + str(y) + "' class='hidelink medal shiny gold' href='/charts_tracks?max=50&in=" + str(y) + "'><span>" + str(y) + "</span></a>"
html_medals += "<a title='Best Track in " + str(y) + "' class='hidelink medal shiny gold' href='/charts_tracks?in=" + str(y) + "'><span>" + str(y) + "</span></a>"
if "silver" in data["medals"]:
for y in data["medals"]["silver"]:
html_medals += "<a title='Second Best Track in " + str(y) + "' class='hidelink medal shiny silver' href='/charts_tracks?max=50&in=" + str(y) + "'><span>" + str(y) + "</span></a>"
html_medals += "<a title='Second Best Track in " + str(y) + "' class='hidelink medal shiny silver' href='/charts_tracks?in=" + str(y) + "'><span>" + str(y) + "</span></a>"
if "bronze" in data["medals"]:
for y in data["medals"]["bronze"]:
html_medals += "<a title='Third Best Track in " + str(y) + "' class='hidelink medal shiny bronze' href='/charts_tracks?max=50&in=" + str(y) + "'><span>" + str(y) + "</span></a>"
html_medals += "<a title='Third Best Track in " + str(y) + "' class='hidelink medal shiny bronze' href='/charts_tracks?in=" + str(y) + "'><span>" + str(y) + "</span></a>"