From 41799268997bc72bc17e5cd2449be69fcf610352 Mon Sep 17 00:00:00 2001 From: Broque Thomas <26755000+Nezreka@users.noreply.github.com> Date: Fri, 22 May 2026 08:34:42 -0700 Subject: [PATCH] Fix missing album placeholder asset path Update Import Music album and queue artwork fallbacks to use the shipped /static/placeholder-album.png asset instead of the nonexistent /static/placeholder.png path. Replace the remaining static UI fallback to the missing placeholder path and add a regression test that fails if static JS references it again. --- tests/webui/test_assets.py | 16 ++++++++++++++++ webui/static/discover.js | 2 +- webui/static/stats-automations.js | 10 +++++----- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/tests/webui/test_assets.py b/tests/webui/test_assets.py index 21660899..8c6a921d 100644 --- a/tests/webui/test_assets.py +++ b/tests/webui/test_assets.py @@ -4,6 +4,7 @@ from __future__ import annotations import json import os +from pathlib import Path import time import pytest @@ -94,3 +95,18 @@ def test_load_webui_vite_manifest_reloads_when_file_changes(tmp_path): second = load_webui_vite_manifest(manifest_path) assert second["src/app/main.tsx"]["file"] == "assets/two.js" + + +def test_static_ui_uses_existing_album_placeholder_asset(): + repo_root = Path(__file__).resolve().parents[2] + static_dir = repo_root / "webui" / "static" + + assert (static_dir / "placeholder-album.png").exists() + assert not (static_dir / "placeholder.png").exists() + + stale_refs = [] + for path in static_dir.glob("*.js"): + if "/static/placeholder.png" in path.read_text(encoding="utf-8"): + stale_refs.append(path.name) + + assert stale_refs == [] diff --git a/webui/static/discover.js b/webui/static/discover.js index e1d05c12..b5303e5d 100644 --- a/webui/static/discover.js +++ b/webui/static/discover.js @@ -6841,7 +6841,7 @@ function _renderByltTrackCard(t) { return `
+
+
+