{% extends "base.html" %} {% import "macros.html" as macros %} {% macro tracker_status_icon(value) %} {% if value == 'K' %} {{macros.icon("#icon-check-bold", width=16, height=16, class="text-success")}} {% elif value == 'N' %} {{macros.icon("#icon-hourglass-bold", width=16, height=16, class="text-info")}} {% else %} {{macros.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 %} {% macro row_status(value) %} {% if value == 'K' %} {{macros.icon("#icon-check-bold", width=16, height=16, class="text-success")}} {% elif value == 'S' %} {{macros.icon("#icon-hourglass-bold", width=16, height=16, class="text-info")}} {% else %} {{macros.icon("#icon-warning-bold", width=16, height=16, class="text-warning")}} {% endif %} {% endmacro %} {% block content %}

System status

{% if torrent_running %}

Downloads

BitTorrent is running and listening to port {{torrent_port}}

{% if torrents %}
{% for t in torrents %}
{% set series = t.release.episode.series %} {% set episode = t.release.episode %} {% set episode_hash = 'e' ~ t.release.episode.id %} {% set release_hash = 'r' ~ t.release.info_hash %}
{% if t.status == 'D' %}

{{macros.icon("#icon-check-bold", width=16, height=1, class="mr-1")}}Downloaded {% if t.downloaded_on %}{{t.downloaded_on | datetime_since(utc_now)}}{% endif %}
{% else %} {# Download still in progress #}

Checking download status…
{% endif %}
{% set request_url = url_for('main.remove_torrent', info_hash=t.release.info_hash) %}
{% endfor %}
{% else %}

No active downloads.

{% endif %} {% else %}
{{macros.icon("#icon-warning-bold", width=16, height=16, class="mr-2 text-warning")}} Built-in BitTorrent client is not running. Please review
{% endif %}
{% if log_rows %}

Library

Last {{max_log_rows}} update operations

{% for row in log_rows %} {% endfor %}
{{row.timestamp|human_date_time}} UTC {{row_status(row.status)}}{{row.description}}
{% include '_chart.html' %}

New torrents fetched by server in the last {{max_chart_days}} days

{% endif %} {% if trackers %}

Trackers

Servers periodically queried for torrent swarm information. {% if max_last_scraped_on %} Last checked on {{max_last_scraped_on|human_date_time}} UTC{% endif %}

{% for tracker in trackers %} {% endfor %}
{{tracker_status_icon(tracker.status)}}{{tracker.url|nice_url}}{{tracker_status_description(tracker.status)}}
{% endif %}
{% endblock %}