Show album art on the song page, dashboard and history
CI / validate-monitoring (push) Successful in 9s
CI / lint (push) Successful in 14s
CI / federation-interop (push) Successful in 1m7s
CI / test (push) Successful in 3m24s
CI / images (push) Skipped
CI / assets (push) Skipped
CI / python-package (push) Skipped
CI / trigger-deploy (push) Skipped
CI / notify (push) Successful in 6s
CI / validate-monitoring (push) Successful in 9s
CI / lint (push) Successful in 14s
CI / federation-interop (push) Successful in 1m7s
CI / test (push) Successful in 3m24s
CI / images (push) Skipped
CI / assets (push) Skipped
CI / python-package (push) Skipped
CI / trigger-deploy (push) Skipped
CI / notify (push) Successful in 6s
New frontend/js/art.js builds a thumbnail that starts as a placeholder and swaps itself for the real cover once (if) it resolves, fetched via the new /api/v1/art/album endpoint with the existing bearer-auth transport and handed to the browser as a blob: object URL (no query-string tokens, no hotlinking). Wired into all four places a track/album appears: the song page's glowing display, the dashboard's "Most played > Albums" list, the dashboard's "Recently played" list, and the full History page - Artists/Tracks rankings are left alone. Also fixes a real reliability gap found during manual testing: Cover Art Archive's existence check (a HEAD request, redirected through archive.org) had no retry at all, unlike the MusicBrainz search next to it, and an occasional slow/flaky response there was enough to fail a lookup outright. It now retries the same way. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5bdeeddb0b
commit
dfd2ef868b
8 files changed
+160
-17
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { api } from "./api.js";
|
||||
import { artThumb } from "./art.js";
|
||||
import { errorBox, formatDay, formatTime, h, num, replace } from "./dom.js";
|
||||
import { signedInPage } from "./layout.js";
|
||||
|
||||
@@ -38,11 +39,12 @@ function render(result) {
|
||||
h("h2", { class: "log-day" }, formatDay(scrobbles[0].played_at)),
|
||||
h(
|
||||
"ol",
|
||||
{ class: "log log-clock" },
|
||||
{ class: "log log-clock log-art" },
|
||||
scrobbles.map((s) =>
|
||||
h(
|
||||
"li",
|
||||
{},
|
||||
artThumb(s.album_artist || s.artist, s.album),
|
||||
h("time", { datetime: s.played_at }, formatTime(s.played_at)),
|
||||
h(
|
||||
"span",
|
||||
|
||||
Reference in new issue
Block a user