fix(queue): resolve real track covers in queue panel
Docker Build & Publish / build (push) Has been cancelled
Docker Build & Publish / push (push) Has been cancelled
Docker Build & Publish / Prune old image versions (push) Has been cancelled

Queue rows passed albumArtUrl straight to ArtTile, but for tracks that
field is usually empty — the real cover is served per-track from
/tracks/{id}/cover. Apply the same resolution PersistentPlayer uses
(getCoverUrl ?? getTrackCoverUrl) for both the now-playing tile and the
up-next rows.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Senko-san
2026-06-13 17:06:21 +03:00
parent d1b2b40ffd
commit df2531171e
5 changed files with 47 additions and 9 deletions
+16 -1
View File
@@ -12,16 +12,24 @@ import {
import { toggleQueue } from '../../store/slices/player';
import { openTrackInfo } from '../../store/slices/ui';
import { useResolvedQueueEntry } from '../../hooks/useResolvedQueueEntry';
import { getCoverUrl, getTrackCoverUrl } from '../../api/endpoints/streaming';
export function QueuePanel() {
const { t } = useTranslation();
const dispatch = useAppDispatch();
const queue = useAppSelector((s) => s.queue);
const token = useAppSelector((s) => s.auth.accessToken);
const isOpen = useAppSelector((s) => s.player.isQueueOpen);
const nowEntry =
queue.currentIndex >= 0 ? queue.entries[queue.currentIndex] : undefined;
const now = useResolvedQueueEntry(nowEntry);
const nowArtUrl = now
? (getCoverUrl(now.albumArtUrl) ??
(token && now.hasCover
? getTrackCoverUrl(now.trackId, token, true)
: undefined))
: undefined;
const upNext = queue.entries
.map((entry, index) => ({ entry, index }))
.filter(({ index }) => index > queue.currentIndex);
@@ -81,6 +89,7 @@ export function QueuePanel() {
seed={now.albumTitle}
size={44}
label={now.albumTitle}
src={nowArtUrl}
/>
<div className="qt">
<div className="t">{now.title}</div>
@@ -171,8 +180,14 @@ function QueueRow({
onRemove: () => void;
}) {
const { t } = useTranslation();
const token = useAppSelector((s) => s.auth.accessToken);
const resolved = useResolvedQueueEntry(entry);
const albumTitle = resolved?.albumTitle ?? entry.albumTitle;
const artUrl =
getCoverUrl(resolved?.albumArtUrl) ??
(token && resolved?.hasCover
? getTrackCoverUrl(resolved.trackId, token, true)
: undefined);
return (
<div
@@ -183,7 +198,7 @@ function QueueRow({
<span className="grip">
<Icon name="dots-six-vertical" />
</span>
<ArtTile seed={albumTitle} size={36} label={albumTitle} />
<ArtTile seed={albumTitle} size={36} label={albumTitle} src={artUrl} />
<div className="qt">
<div className="t">{resolved?.title ?? entry.title}</div>
<div className="r">{resolved?.artistName ?? entry.artistName}</div>