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

Fixed sins of my youth

This commit is contained in:
krateng 2022-04-23 19:22:32 +02:00
parent c3bb8ad322
commit c86ae31ea9
2 changed files with 10 additions and 8 deletions

View File

@ -537,17 +537,19 @@ def search(**keys):
artists_result = []
for a in artists:
result = {
'name': a,
'artist': a,
'link': "/artist?" + compose_querystring(internal_to_uri({"artist": a})),
'image': images.get_artist_image(a)
}
result["image"] = images.get_artist_image(a)
artists_result.append(result)
tracks_result = []
for t in tracks:
result = t
result["link"] = "/track?" + compose_querystring(internal_to_uri({"track":t}))
result["image"] = images.get_track_image(t)
result = {
'track': t,
'link': "/track?" + compose_querystring(internal_to_uri({"track":t})),
'image': images.get_track_image(t)
}
tracks_result.append(result)
return {"artists":artists_result[:max_],"tracks":tracks_result[:max_]}

View File

@ -61,7 +61,7 @@ function searchresult() {
}
for (var i=0;i<artists.length;i++) {
name = artists[i]["name"];
name = artists[i]["artist"];
link = artists[i]["link"];
image = artists[i]["image"];
@ -74,8 +74,8 @@ function searchresult() {
}
for (var i=0;i<tracks.length;i++) {
artists = tracks[i]["artists"].join(", ");
title = tracks[i]["title"];
artists = tracks[i]["track"]["artists"].join(", ");
title = tracks[i]["track"]["title"];
link = tracks[i]["link"];
image = tracks[i]["image"];