Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lumen/src/components/MusicSections.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,13 @@ export const albumArt = (
artist?: string | null,
title?: string | null
): string | undefined => {
// CAA hands out archive.org thumbnail links, which 404 for a while after
// an upload: those go through the album-art route too
const fromCaa =
!coverUrl || /^https:\/\/coverartarchive\.org\//.test(coverUrl);
!coverUrl ||
/^https:\/\/(?:coverartarchive\.org|archive\.org\/download\/mbid-|ia\d+\.us\.archive\.org\/)/.test(
coverUrl
);
if (!fromCaa || !mbid || !/^[0-9a-f-]{36}$/i.test(mbid))
return coverUrl ?? undefined;
const query = new URLSearchParams();
Expand Down
3 changes: 3 additions & 0 deletions lumen/src/pages/Requests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import {
canViewAllRequests,
Pill,
} from '../components/detail';
import { songArt } from '../components/MusicSections';
import { RequestEditSheet } from '../components/requestEdit';
import RequestEpisodeQueueSheet, {
canEditEpisodeQueue,
Expand Down Expand Up @@ -1231,6 +1232,8 @@ function trackRequestRow(tr: TrackRequestItem): Row {
return {
r,
title: tr.title,
// the song's cover by artist and title (song requests carry no album id)
art: songArt(tr.artist, tr.title),
cover: true,
href: '/track-requests',
sub: ['Track', tr.artist].filter(Boolean).join(' · '),
Expand Down
Loading