{% macro render_series_timeline(series) %} {% endmacro %} {% macro render_series_grid(series) %}
{% for s in series %}
{% if loop.changed(s.added_on_date) %}

{{s.added_on_date|to_date|timeline_date}}

{% else %}
 
{% endif %} {% set episode_hash = 'e' ~ s.episode.id %}

{{s.episode.season_episode_id}}

{{ s.episode.name }}

{{ "{:,}".format(s.release_count)}} new torrents

{% endfor %}
{% endmacro %} {% macro render_series_card(series) %}
Poster for {{series.name}}

{{series.name}}

{% endmacro %} {% macro air_date(value, today) %} {% if value %} {% if value <= today %} {{value | human_date}} {% else %} Will air {{value | human_date}} {% endif %} {% else %}   {% endif %} {% endmacro %} {% macro torrent_download_status(release, status) %} {% if status == 'D' %}
{{icon("#icon-check-bold", width=16, height=16, class="text-success mr-1")}}Downloaded
{% elif status == 'A' or status == 'd' %} {% else %} {% set request_url = url_for('main.download_torrent', release_id=release.id) %} {% endif %} {% endmacro %} {% macro torrent_download_progress(release) %}
Checking download status…
{% endmacro %} {% macro torrent_files(torrent) %}
{% endmacro %} {% macro icon(id, width=30, height=30, class="") %} {% endmacro %} {% macro tracker_status_icon(value) %} {% if value == 'K' %} {{icon("#icon-check-bold", width=16, height=16, class="text-success")}} {% elif value == 'N' %} {{icon("#icon-hourglass-bold", width=16, height=16, class="text-info")}} {% else %} {{icon("#icon-warning-bold", width=16, height=16, class="text-warning")}} {% endif %} {% endmacro %} {% macro tracker_status_description(value) %} {% if value == 'K' %} {% elif value == 'N' %} (not contacted yet) {% elif value == 'T' %} (timed out) {% elif value == 'P' %} (protocol error) {% elif value == 'D' %} (DNS error) {% else %} (error) {% endif %} {% endmacro %}