mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Fixed images in search results
This commit is contained in:
parent
c8f678b600
commit
ba5b0c8957
@ -321,14 +321,14 @@ def search(**keys):
|
|||||||
'name': a,
|
'name': a,
|
||||||
'link': "/artist?" + compose_querystring(internal_to_uri({"artist": a})),
|
'link': "/artist?" + compose_querystring(internal_to_uri({"artist": a})),
|
||||||
}
|
}
|
||||||
result["image"] = "/image?" + compose_querystring(internal_to_uri({"artist":a}))
|
result["image"] = images.get_artist_image(a)
|
||||||
artists_result.append(result)
|
artists_result.append(result)
|
||||||
|
|
||||||
tracks_result = []
|
tracks_result = []
|
||||||
for t in tracks:
|
for t in tracks:
|
||||||
result = t
|
result = t
|
||||||
result["link"] = "/track?" + compose_querystring(internal_to_uri({"track":t}))
|
result["link"] = "/track?" + compose_querystring(internal_to_uri({"track":t}))
|
||||||
result["image"] = "/image?" + compose_querystring(internal_to_uri({"track":t}))
|
result["image"] = images.get_track_image(t)
|
||||||
tracks_result.append(result)
|
tracks_result.append(result)
|
||||||
|
|
||||||
return {"artists":artists_result[:max_],"tracks":tracks_result[:max_]}
|
return {"artists":artists_result[:max_],"tracks":tracks_result[:max_]}
|
||||||
|
Loading…
Reference in New Issue
Block a user