Skip to content

Commit

Permalink
Display queue item thumbnails in all cases
Browse files Browse the repository at this point in the history
  • Loading branch information
nukeop committed Dec 3, 2024
1 parent 34ec5dd commit f8e315a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/ui/lib/components/QueueItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import common from '../../common.scss';
import styles from './styles.scss';

import artPlaceholder from '../../../resources/media/art_placeholder.png';
import { getTrackArtist, getTrackTitle } from '../../utils';
import { getThumbnail, getTrackArtist, getTrackTitle } from '../../utils';
import { Track } from '../../types';
import Img from 'react-image';

Expand Down Expand Up @@ -48,10 +48,12 @@ export const QueueItem: React.FC<QueueItemProps> = ({
<div className={styles.thumbnail}>
{track.loading
? <Loader type='small' className={isCompact && styles.compact_loader} />
: <Img
src={track.thumbnail ?? artPlaceholder}
: (
<Img
src={getThumbnail(track) ?? artPlaceholder}
unloader={<img src={artPlaceholder}/>}
/>}
/>
)}

<div
data-testid='queue-item-remove'
Expand Down

0 comments on commit f8e315a

Please sign in to comment.