mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Fixed proper recognition of artist and track entities, fix GH-111
This commit is contained in:
parent
741246a7c1
commit
9d8752d052
@ -2,14 +2,14 @@
|
||||
|
||||
{% import 'snippets/links.jinja' as links %}
|
||||
|
||||
{% if 'artists' in entity %}
|
||||
{% if entity is mapping and 'artists' in entity %}
|
||||
{% set img = images.get_track_image(entity) %}
|
||||
{% else %}
|
||||
{% set img = images.get_artist_image(entity) %}
|
||||
{% endif %}
|
||||
|
||||
<td class='icon'><div style="background-image:url('{{ img }}')"></div></td>
|
||||
{% if "artists" in entity %}
|
||||
{% if entity is mapping and 'artists' in entity %}
|
||||
{% if settings['TRACK_SEARCH_PROVIDER'] %}
|
||||
<td class='searchProvider'>{{ links.link_search(entity) }}</td>
|
||||
{% endif %}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{% macro link(entity) -%}
|
||||
{% if 'artists' in entity %}
|
||||
{% if entity is mapping and 'artists' in entity %}
|
||||
{% set name = entity.title %}
|
||||
{% else %}
|
||||
{% set name = entity %}
|
||||
@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
{% macro url(entity) %}
|
||||
{% if 'artists' in entity -%}
|
||||
{% if entity is mapping and 'artists' in entity -%}
|
||||
{{ mlj_uri.create_uri("/track",{'track':entity}) }}
|
||||
{%- else -%}
|
||||
{{ mlj_uri.create_uri("/artist",{'artist':entity}) }}
|
||||
|
Loading…
Reference in New Issue
Block a user