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
@@ -1079,3 +1079,71 @@ input {
|
||||
margin: 0;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* The song page's glowing display gets an art thumbnail alongside its text, when there's one */
|
||||
.display-with-art {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1.25rem;
|
||||
}
|
||||
|
||||
.display-with-art .display-body {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.display-art {
|
||||
width: 4.5rem;
|
||||
height: 4.5rem;
|
||||
flex: none;
|
||||
}
|
||||
|
||||
/* ---- Album art ---------------------------------------------------------------- */
|
||||
.art-thumb {
|
||||
display: block;
|
||||
border-radius: var(--radius-control);
|
||||
object-fit: cover;
|
||||
background: var(--paper-raised);
|
||||
border: 1px solid var(--rule);
|
||||
}
|
||||
|
||||
.art-thumb-empty {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* No artwork: a plain ring, echoing .brand-mark's small round "lamp" motif */
|
||||
.art-thumb-empty::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 32%;
|
||||
border-radius: 50%;
|
||||
border: 2px solid var(--bar);
|
||||
}
|
||||
|
||||
/* Most played > Albums: a thumbnail column ahead of the rank */
|
||||
.ranking-art li {
|
||||
grid-template-columns: 2.25rem 2rem minmax(0, 1fr) auto;
|
||||
}
|
||||
|
||||
.ranking-art .art-thumb {
|
||||
width: 2.25rem;
|
||||
height: 2.25rem;
|
||||
}
|
||||
|
||||
.ranking-art .meter {
|
||||
left: 5.75rem;
|
||||
}
|
||||
|
||||
/* Recently played / History: a thumbnail column ahead of the time */
|
||||
.log-art li {
|
||||
grid-template-columns: 2.25rem 8rem minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.log-art.log-clock li {
|
||||
grid-template-columns: 2.25rem 3.5rem minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.log-art .art-thumb {
|
||||
width: 2.25rem;
|
||||
height: 2.25rem;
|
||||
}
|
||||
Reference in new issue
Block a user