23 lines
1.2 KiB
HTML
23 lines
1.2 KiB
HTML
|
|
{% macro tv_show_results(results) -%}
|
|
<div class="d-flex flex-wrap">
|
|
{% for result in results %}
|
|
<form action="details" method="POST">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
|
<input type="hidden" name="type" value="show"/>
|
|
<input type="hidden" name="data" value="{{result|tojson|urlencode}}" />
|
|
<a style="cursor: pointer" onclick="this.parentElement.submit()">
|
|
{% for banner in result.images|selectattr('coverType','eq','banner') %}
|
|
<img class="img-fluid banner" src="{{client.sonarr.url.rsplit("/",2)[0]+banner.url}}" title="{{result.title}}" />
|
|
{% else %}
|
|
{% set poster=(result.images|selectattr('coverType','eq','poster')|first) %}
|
|
{% if poster %}
|
|
{% set poster=(client.sonarr.url.rsplit("/",2)[0]+poster.url) %}
|
|
{% endif %}
|
|
<img class="img-fluid banner" src="{{url_for('placeholder',width=758, height=140, poster=poster, text=result.title)}}" title="{{result.title}}" />
|
|
{% endfor %}
|
|
</a>
|
|
</form>
|
|
{% endfor %}
|
|
</div>
|
|
{% endmacro %}
|