Fix skipped_lock creating phantom empty genre/dedup runs; add Run now to playlist list

genre_review_service.run() and dedup_review_service._run_scan() both
unconditionally created a new run row even when the underlying job never
actually executed (skipped_lock, or any other non-success status). For
genres this was directly user-visible: the review page always shows the
most recent run, so a skipped click created an empty run that displaced
the real previous preview, making it look like every pending change had
vanished. Both now return None (persisting nothing) when the job didn't
succeed, and both routers surface a "didn't run, something else was
using the pipeline" notice instead of silently redirecting. Cleaned up
the one phantom empty genre_runs row already sitting in production,
restoring the real 20-change preview.

Also added a "Run now" button to each row on the Playlists list page
(previously only on a playlist's own detail page), for the common case
of adding new tracks and wanting to sync immediately.
This commit is contained in:
andrew
2026-07-09 12:01:53 -06:00
parent c442fb78ef
commit 2a19f84575
7 changed files with 50 additions and 10 deletions
+3
View File
@@ -21,6 +21,9 @@
<td class="muted mono">{{ sync_times.get(p.id) or "unscheduled" }}</td>
<td class="muted">{{ "yes" if p.no_m3u else "no" }}</td>
<td class="actions-cell">
<form method="post" action="/settings/jobs/playlist:{{ p.name }}/run" class="inline">
<button type="submit" class="btn btn-sm" title="Sync this playlist now instead of waiting for its scheduled time">Run now</button>
</form>
<form method="post" action="/playlists/{{ p.id }}/delete" class="inline"
onsubmit="return confirm('Remove {{ p.name }}? This deletes its rendered config but not any downloaded music.')">
<button type="submit" class="btn btn-sm btn-danger">Remove</button>