Fix library filter, compact dashboard/credentials UI, add fuzzy audio dedup

- beets_service: filter params now use truthy checks instead of `is not
  None`, since a real <select> left on "(any)" submits an empty string,
  not an absent param -- the filter form silently matched zero rows for
  any real submission. Also match grouping tokens within "; "-joined
  multi-playlist values instead of requiring an exact string match.
- dashboard: credential status renders as compact dot indicators instead
  of badge+text chips, so long scope names (telegram) stay on one line.
- credentials page: two-column grid layout instead of one long column.
- find-fuzzy-dupes.py: add --json/--only-paths flags matching
  dedup-library.sh's convention, so it can plug into the same review
  queue.
- dedup_review_service: add scan_fuzzy() and route confirm_and_apply()
  to the correct underlying script (dedup-library.sh vs
  find-fuzzy-dupes.py) per candidate's pass_name, since tag-based passes
  miss duplicates whose tags differ even when the audio is identical
  (e.g. a remix credited to different artists between two copies).
- dedup page: add a "Scan for audio duplicates" trigger alongside the
  existing tag-based scan.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
andrew
2026-07-08 16:25:52 -06:00
parent c87ddc2649
commit 02744f6654
8 changed files with 217 additions and 85 deletions
+23 -19
View File
@@ -8,25 +8,29 @@
</div>
</div>
{% for scope, fields in scope_fields.items() %}
<h2 class="scope-header">{{ scope }}</h2>
<div class="panel" style="max-width:560px;">
<form method="post" action="/settings/credentials/{{ scope }}">
{% for field in fields %}
<div class="field wide">
<label for="{{ scope }}_{{ field }}">
{{ field }}
{% if field in configured.get(scope, []) %}<span class="badge badge-success" style="margin-left:0.5rem;">set</span>{% endif %}
</label>
{% if field in ("cookies_txt",) %}
<textarea id="{{ scope }}_{{ field }}" name="{{ field }}" rows="6" placeholder="leave blank to keep current"></textarea>
{% else %}
<input type="password" id="{{ scope }}_{{ field }}" name="{{ field }}" placeholder="leave blank to keep current" autocomplete="off">
{% endif %}
<div class="cred-grid">
{% for scope, fields in scope_fields.items() %}
<div class="cred-scope">
<h2 class="scope-header">{{ scope }}</h2>
<div class="panel">
<form method="post" action="/settings/credentials/{{ scope }}">
{% for field in fields %}
<div class="field wide">
<label for="{{ scope }}_{{ field }}">
{{ field }}
{% if field in configured.get(scope, []) %}<span class="badge badge-success" style="margin-left:0.5rem;">set</span>{% endif %}
</label>
{% if field in ("cookies_txt",) %}
<textarea id="{{ scope }}_{{ field }}" name="{{ field }}" rows="6" placeholder="leave blank to keep current"></textarea>
{% else %}
<input type="password" id="{{ scope }}_{{ field }}" name="{{ field }}" placeholder="leave blank to keep current" autocomplete="off">
{% endif %}
</div>
{% endfor %}
<button type="submit" class="btn">Save {{ scope }}</button>
</form>
</div>
{% endfor %}
<button type="submit" class="btn">Save {{ scope }}</button>
</form>
</div>
{% endfor %}
</div>
{% endfor %}
{% endblock %}
+2 -9
View File
@@ -42,16 +42,9 @@
{% endif %}
<h2>Credential status</h2>
<ul class="chip-list">
<ul class="chip-list auth-chip-list">
{% for a in auth_states %}
<li>
{% if a.configured %}<span class="badge badge-success">set</span>{% else %}<span class="badge badge-muted">unset</span>{% endif %}
{{ a.scope }}
{% if a.days_left is defined %}
{% if a.days_left < 14 %}<span class="badge badge-warning">{{ a.days_left }}d left</span>
{% else %}<span class="muted">({{ a.days_left }}d left)</span>{% endif %}
{% endif %}
</li>
<li title="{{ a.scope }}: {{ 'configured' if a.configured else 'not configured' }}{% if a.days_left is defined %}, cookie expires in {{ a.days_left }}d{% endif %}"><span class="status-dot {{ 'status-dot-success' if a.configured else 'status-dot-muted' }}{% if a.days_left is defined and a.days_left < 14 %} status-dot-warning{% endif %}"></span>{{ a.scope }}{% if a.days_left is defined %}<span class="muted"> {{ a.days_left }}d</span>{% endif %}</li>
{% endfor %}
</ul>
<p><a href="/settings/credentials">Manage credentials &rarr;</a></p>
+4 -1
View File
@@ -8,7 +8,10 @@
</div>
<div class="actions">
<form method="post" action="/dedup/scan" class="inline">
<button type="submit" class="btn btn-primary">Scan now</button>
<button type="submit" class="btn btn-primary" title="Tag-based: matches on artist/title/albumartist across 4 passes">Scan now</button>
</form>
<form method="post" action="/dedup/scan-fuzzy" class="inline">
<button type="submit" class="btn" title="Acoustic fingerprint match -- catches the same recording filed under different tags">Scan for audio duplicates</button>
</form>
</div>
</div>