video Automations: hide the music system automations (show only owned_by='video')

Per Boulder — the music system automations target music resources and don't belong on
the video side. The page now filters to owned_by='video' (a tag the upcoming video
automations will carry); none exist yet, so the System section is hidden and the empty
state reads 'Video automations coming soon — separate from the music ones'. The hub +
layout stay (video hub content + video automations come next). Balance clean.
This commit is contained in:
BoulderBadgeDad 2026-06-19 18:29:02 -07:00
parent 483cc61e08
commit 3698ed1ec0
2 changed files with 9 additions and 10 deletions

View file

@ -1325,8 +1325,8 @@
<div class="automations-list" data-vauto-list></div>
<div class="automations-empty" data-vauto-empty style="display:none;">
<div class="automations-empty-icon">&#9889;</div>
<div class="automations-empty-title">No system automations yet</div>
<div class="automations-empty-text">They appear here once the automation engine creates them.</div>
<div class="automations-empty-title">Video automations coming soon</div>
<div class="automations-empty-text">The video side gets its own automations (library scan, cleanup, wishlist…) — separate from the music ones.</div>
</div>
</div>
</section>

View file

@ -18,12 +18,11 @@
.then(function (r) { return r.ok ? r.json() : null; }).catch(function () { return null; });
}
// The system automations the video view shows (drop Beatport + user/playlist ones).
function isVideoSystem(a) {
return a && a.is_system &&
a.action_type !== 'refresh_beatport_cache' &&
a.action_type !== 'playlist_pipeline' &&
a.owned_by !== 'playlist_pipeline';
// ONLY video-owned automations belong here — the music system automations target
// music resources and are hidden. Video automations (tagged owned_by='video') are a
// separate set, built next; for now none exist so the list is empty by design.
function isVideoAutomation(a) {
return a && a.owned_by === 'video';
}
function renderSystem(sys) {
@ -32,7 +31,7 @@
var existing = host.querySelector('#vauto-section-system');
if (!sys.length) {
if (existing) existing.remove();
if (emptyEl && !host.querySelector('#auto-section-hub')) emptyEl.style.display = '';
if (emptyEl) emptyEl.style.display = '';
return;
}
if (emptyEl) emptyEl.style.display = 'none';
@ -72,7 +71,7 @@
function load() {
getJSON('/api/automations').then(function (d) {
var all = Array.isArray(d) ? d : (d && d.automations) || [];
var sys = all.filter(isVideoSystem);
var sys = all.filter(isVideoAutomation);
renderStats(sys);
renderSystem(sys);
renderHubOnce();