Fix author in playlist

This commit is contained in:
Jesús 2022-01-31 22:12:55 -05:00
parent a465805cb9
commit 6188ba81a0
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766

View File

@ -37,17 +37,16 @@
</a>
<h4 class="title"><a href="{{ info['url'] }}" title="{{ info['title'] }}">{{ info['title'] }}</a></h4>
{% set author_description = info['author'] %}
{% set AUTHOR_DESC_LENGTH = 35 %}
{% if author_description|length >= AUTHOR_DESC_LENGTH %}
{% set author_description = author_description[:AUTHOR_DESC_LENGTH].split(' ')[:-1]|join(' ') %}
{% if not author_description[-1] in ['.', '?', ':', '!'] %}
{% set author_more = author_description + '…' %}
{% set author_description = author_more|replace('"','') %}
{% endif %}
{% endif %}
{% if include_author %}
{% set author_description = info['author'] %}
{% set AUTHOR_DESC_LENGTH = 35 %}
{% if author_description|length >= AUTHOR_DESC_LENGTH %}
{% set author_description = author_description[:AUTHOR_DESC_LENGTH].split(' ')[:-1]|join(' ') %}
{% if not author_description[-1] in ['.', '?', ':', '!'] %}
{% set author_more = author_description + '…' %}
{% set author_description = author_more|replace('"','') %}
{% endif %}
{% endif %}
{% if info.get('author_url') %}
<address title="{{ info['author'] }}"><b><a href="{{ info['author_url'] }}">{{ author_description }}</a></b></address>
{% else %}