{% extends "base.html" %}
{% block title %}{{ playlist.name }} — alembic{% endblock %}
{% block content %}
← back to playlists
Status
{% if error %}
Couldn't fetch live status: {{ error }}
{% elif status %}
{% set status_meta = {
"IN_LIBRARY": ("var(--status-success)", "In library"),
"QUARANTINED": ("var(--status-warning)", "Quarantined"),
"DOWNLOADED_PENDING_IMPORT": ("var(--status-info)", "Downloaded, pending import"),
"NOT_YET_ATTEMPTED": ("var(--status-muted)", "Not yet attempted")
} %}
{% set total = status.counts.values() | sum %}
{% for key, count in status.counts.items() %}
{% if count %}
{% endif %}
{% endfor %}
{% for key, count in status.counts.items() %}
{{ count }} {{ status_meta.get(key, (None, key))[1] }}
{% endfor %}
{% set badge_class = {"IN_LIBRARY": "badge-success", "QUARANTINED": "badge-warning", "DOWNLOADED_PENDING_IMPORT": "badge-info", "NOT_YET_ATTEMPTED": "badge-muted"} %}
{% set dot_class = {"IN_LIBRARY": "status-dot-success", "QUARANTINED": "status-dot-warning", "DOWNLOADED_PENDING_IMPORT": "status-dot-info", "NOT_YET_ATTEMPTED": "status-dot-muted"} %}
{% set downloaded = status.tracks | rejectattr("status", "equalto", "NOT_YET_ATTEMPTED") | list %}
{% set waiting = status.tracks | selectattr("status", "equalto", "NOT_YET_ATTEMPTED") | list %}
{% endif %}
{% endblock %}