{% extends "base.html" %} {% from 'bootstrap/utils.html' import render_icon %} {% block app_content %}

Request details

{% set data = request.data|fromjson%}
{% set label = {True:"Approved",False:"Declined",None:"Pending"}[request.approved] %} {% set class = {True:"bg-success",False:"bg-danger", None: ""}[request.approved] %} {% if request.approved and jellyfin_id %} {% set label = "Approved and Downloaded" %} {% endif %} {% if data.tvdbId %} {% set link="https://www.thetvdb.com/?tab=series&id=%s"|format(data.tvdbId) %} {% elif data.imdbId %} {% set link="https://www.imdb.com/title/%s"|format(data.imdbId) %} {% endif %}

Title: {{data.title}} ({{data.year}})

Type: {{{"sonarr":"TV Show","radarr":"Movie"}.get(request.request_type,"Unknown")}}

Added: {{request.added_date|ago_dt(0)}} ago

Status: {{label}}

{{data.overview}}

{% if jellyfin_id %} Open in Jellyfin {% endif %}
{% set downloads = (request.downloads|list) %} {% if downloads %}

Downloads

{% for download in downloads %} {% set torrent = download.download.info %} {% set dl_rate = torrent.downloaded / torrent.time_active %} {% set eta_act = [0, (torrent.size - torrent.downloaded) / dl_rate]|max %} {% endfor %}
Name Quality Progress
{{download.title}} {{download.quality.quality.name}} {{(torrent.progress*100)|round(2)}} % (ETA: {{[torrent.eta,eta_act]|min|round(0)|timedelta(clamp=true)}})
{% endif %} {% endblock %}