Skip to content
Open
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
8 changes: 7 additions & 1 deletion backend/src/routes/subsonic/playback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,15 @@ playbackRouter.all("/getCoverArt.view", wrap(async (req, res) => {

let coverUrl: string | null = null;

// Some clients pass native cover references directly as the id value
// (e.g. id=native:artists/<file>.jpg).
if (rawId.startsWith("native:")) {
coverUrl = rawId;
}

// Try album first (most common); ar- prefix skips album lookup since that ID is an artist ID.
// Falls through to artist/track as a cascade — clients may use any prefix for any entity.
if (!rawId.startsWith("ar-")) {
if (!coverUrl && !rawId.startsWith("ar-")) {
const album = await prisma.album.findUnique({
where: { id },
select: { coverUrl: true, userCoverUrl: true },
Expand Down
Loading