Files
alembic/app/templates/playlists/detail.html
T
andrew b4dd2286a9 Restructure Settings nav, modernize import page, dedup/genres UX polish
Settings is now one top-nav entry with Credentials and Jobs as sidebar
sub-pages (jobs moved from /jobs to /settings/jobs). Manual import page
replaces the bare file input and free-text filename field with a drag-drop
dropzone and a proper file-picker table. Genres page drops the "force"
checkbox for two explicit buttons (Preview / Fix genres now). Dedup's
"Scan now" runs both the file-naming and acoustic passes together, and the
table labels which pass caught each candidate instead of showing the raw
pass name. .btn-ghost gets a visible border so it reads as a real button
next to Delete/Danger actions instead of looking unaligned. Job names
throughout the UI are now human-readable instead of raw job_key strings.

Also includes the fpcalc exit-code fix from earlier (fingerprint index
was discarding valid fingerprints on files with a benign decode warning).
2026-07-09 10:26:40 -06:00

76 lines
3.2 KiB
HTML

{% extends "base.html" %}
{% block title %}{{ playlist.name }} — alembic{% endblock %}
{% block content %}
<a class="back-link" href="/playlists">&larr; back to playlists</a>
<div class="page-header">
<div>
<h1>{{ playlist.name }}</h1>
<p class="subtitle muted"><a href="{{ playlist.spotify_url }}">{{ playlist.spotify_url }}</a></p>
</div>
<div class="actions">
<form method="post" action="/settings/jobs/playlist:{{ playlist.name }}/run" class="inline">
<button type="submit" class="btn btn-primary">Run now</button>
</form>
</div>
</div>
<div class="panel" style="max-width:560px;">
<form method="post" action="/playlists/{{ playlist.id }}">
<label class="checkbox-field"><input type="checkbox" name="active" value="true" {{ "checked" if playlist.active }}> Active</label>
<div class="field">
<label for="sync_time">Sync time (daily)</label>
<input type="time" id="sync_time" name="sync_time" value="{{ sync_time }}">
<span class="hint">Leave blank for unscheduled/manual-only.</span>
</div>
<label class="checkbox-field"><input type="checkbox" name="no_m3u" value="true" {{ "checked" if playlist.no_m3u }}> Skip M3U</label>
<div class="field wide">
<label for="notes">Notes</label>
<textarea id="notes" name="notes" rows="3">{{ playlist.notes or '' }}</textarea>
</div>
<button type="submit" class="btn">Save</button>
</form>
</div>
<h2>Status</h2>
{% if error %}
<div class="notice warning">Couldn't fetch live status: {{ error }}</div>
{% 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 %}
<div class="status-bar">
{% for key, count in status.counts.items() %}
{% if count %}
<span style="width: {{ (count / total * 100) if total else 0 }}%; background: {{ status_meta.get(key, ('var(--status-muted)', key))[0] }};"></span>
{% endif %}
{% endfor %}
</div>
<div class="status-legend">
{% for key, count in status.counts.items() %}
<span class="item"><span class="dot" style="background: {{ status_meta.get(key, ('var(--status-muted)', key))[0] }}; color: {{ status_meta.get(key, ('var(--status-muted)', key))[0] }};"></span><strong>{{ count }}</strong> {{ status_meta.get(key, (None, key))[1] }}</span>
{% endfor %}
</div>
{% set badge_class = {"IN_LIBRARY": "badge-success", "QUARANTINED": "badge-warning", "DOWNLOADED_PENDING_IMPORT": "badge-info", "NOT_YET_ATTEMPTED": "badge-muted"} %}
<div class="table-wrap scroll">
<table>
<thead><tr><th>Artist</th><th>Title</th><th>Status</th></tr></thead>
<tbody>
{% for t in status.tracks %}
<tr>
<td>{{ t.artist }}</td>
<td>{{ t.title }}</td>
<td><span class="badge {{ badge_class.get(t.status, 'badge-muted') }}">{{ status_meta.get(t.status, (None, t.status))[1] }}</span></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
{% endblock %}