Fix dedup apply lock-hang, mawk-broken tag passes; add track delete, fix button/select CSS
confirm_and_apply no longer marks candidates confirmed before their apply job actually succeeds (a stuck/skipped_lock run was silently vanishing confirmed deletes without deleting anything), switches the fuzzy pass to --apply-pairs to avoid a full rescan on every confirm, and adds a job timeout so a hung subprocess can't hold the global pipeline lock forever. dedup-library.sh's Pass 2-4 use gawk-only features (gensub, POSIX interval regex) but were running under mawk (Debian's default awk) in the deployed image, throwing silent syntax errors on every run -- switched those invocations to gawk explicitly and added it to the Dockerfile. Also: per-track delete button on the library list/detail pages, and two CSS fixes (the primary button's hover gradient was getting clobbered by the base .btn:hover rule's plain background, and the select dropdown arrow had no background-size so it rendered oversized).
This commit is contained in:
@@ -8,6 +8,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if request.query_params.get('deleted') %}
|
||||
<div class="notice success">Track deleted.</div>
|
||||
{% endif %}
|
||||
|
||||
<form method="get" action="/library" class="panel" style="display:flex; gap:0.75rem; flex-wrap:wrap; align-items:flex-end; max-width:none;">
|
||||
<div class="field">
|
||||
<label for="q">Search</label>
|
||||
@@ -47,7 +51,13 @@
|
||||
<td>{{ item.title }}</td>
|
||||
<td class="muted">{{ item.albumartist }}</td>
|
||||
<td><span class="badge badge-muted">{{ item.format }}</span></td>
|
||||
<td><a href="/library/track/{{ item.id }}" class="btn btn-sm btn-ghost">Edit</a></td>
|
||||
<td class="actions-cell">
|
||||
<a href="/library/track/{{ item.id }}" class="btn btn-sm btn-ghost">Edit</a>
|
||||
<form method="post" action="/library/track/{{ item.id }}/delete" class="inline"
|
||||
onsubmit="return confirm('Delete {{ item.artist }} — {{ item.title }}? This removes the file from disk permanently.')">
|
||||
<button type="submit" class="btn btn-sm btn-danger">Delete</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr class="empty-row"><td colspan="5">
|
||||
|
||||
@@ -50,4 +50,13 @@
|
||||
<button type="submit" class="btn">Retag</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<h2>Danger zone</h2>
|
||||
<div class="panel" style="max-width:560px;">
|
||||
<p class="muted" style="margin-top:0;">Removes this track from beets and deletes the file from disk. Not reversible.</p>
|
||||
<form method="post" action="/library/track/{{ item.id }}/delete"
|
||||
onsubmit="return confirm('Delete {{ item.artist }} — {{ item.title }}? This removes the file from disk permanently.')">
|
||||
<button type="submit" class="btn btn-danger">Delete this track</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user