{# -*- mode: web; -*- #} {% extends "base.html" %} {% block title %} {% if current_user.is_authenticated %} Welcome, {{ user.name_first }} {{ user.name_last }}! {% else %} Welcome to mdl, the music downloader {% endif %} {% endblock %} {% block actions %} {#
  • Download database
  • #} {% endblock %} {% block content %} {% if current_user.is_authenticated %}

    New

    Download audio from a URL to the server. {% with form = form_download_remote %} {{ form.csrf_token }} {{ form.url.label() }} {{ form.url() }} {{ form.download_remote() }} {% endwith %}
    {% if pending_files %}

    Pending

    {% for file in pending_files %}
    {{ file }}
    {% endfor %}
    {% endif %} {% if downloaded_files %}

    Finished

    {% for file in downloaded_files %}
    {{ file }} {% with form = form_manage_remote %} {{ form.csrf_token }} {{ form.file_name(value=file) }} {{ form.download_local() }} {{ form.remove_remote() }} {% endwith %}
    {% endfor %}
    {% endif %}

    Download history

    {% for file in download_history %} {% endfor %}
    ID Title Downloaded User
    {{ file.primary_key }} {{ file.title }} {{ file.date_time_downloaded }} {{ file.user.username }}
    {% else %}

    You need to be logged in before using this web app.

    {% endif %} {% endblock %}