{% if pendingUrlDownloads|length > 0 %}
{{ t('url', 'url')|title }} | {{ t('progress', 'progress')|title }} | {{ t('status', 'status')|title }} | {% for pendingUrlDownload in pendingUrlDownloads %} {% set downloadSpeed = 0 %} {% if pendingUrlDownload['job_status'] == 'downloading' and pendingUrlDownload['startedAgo'] > 0 %} {% set downloadSpeed = (pendingUrlDownload['downloaded_size'] / pendingUrlDownload['startedAgo'])|number_format(2, '.', ',') %} {% endif %}|
---|---|---|---|
{{ pendingUrlDownload['url'] }}
{% if pendingUrlDownload['total_size'] > 0 %} ({{ pendingUrlDownload['downloaded_size']|number_format(2, '.', ',') }}){% endif %}
{% if pendingUrlDownload['notes']|length > 0 %}
{{ pendingUrlDownload['notes'] }} {% else %} {% if pendingUrlDownload['new_file_id'] > 0 %} {{ t('download', 'Download')|title }}: {{ pendingUrlDownload['file_original_filename'] }} {% endif %} {% endif %} |
{% if pendingUrlDownload['job_status'] == 'cancelled' or pendingUrlDownload['job_status'] == 'failed' %}-{% else %}
{{ pendingUrlDownload['download_percent']|number_format(2, '.', ',') }}%
{% if downloadSpeed > 0 %}
{{ CoreHelper.formatSize(downloadSpeed) }}s {% endif %} {% endif %} |
{{ pendingUrlDownload['job_status']|title }} {% if pendingUrlDownload['job_status'] == 'pending' %} ({{ t('cancel', 'cancel') }}) {% elseif pendingUrlDownload['job_status'] == 'downloading' %} ({{ t('cancel', 'cancel') }}) {% elseif pendingUrlDownload['job_status'] == 'cancelled' %} ({{ t('remove', 'remove') }}) {% elseif pendingUrlDownload['job_status'] == 'complete' or pendingUrlDownload['job_status'] == 'failed' %} ({{ t('clear', 'clear') }}) {% endif %} |