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:
parent
c3bb8ad322
commit
c86ae31ea9
@ -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_]}
|
||||
|
@ -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"];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user