import { MediaItem } from '../api/jellyfin' import { useJellyfinContext } from '../context/JellyfinContext/JellyfinContext' export const JellyImg = ({ item, type, width, height, imageProps, }: { item: MediaItem type: 'Primary' | 'Backdrop' width: number height: number imageProps?: React.DetailedHTMLProps, HTMLImageElement> }) => { const api = useJellyfinContext() // Check if this is a Spotify track and use SpotifyImage directly if (item.SpotifyImage) { return ( {item.Name} { ;(e.target as HTMLImageElement).src = import.meta.env.BASE_URL + 'default-thumbnail.png' }} /> ) } return ( {item.Name} { ;(e.target as HTMLImageElement).src = import.meta.env.BASE_URL + 'default-thumbnail.png' }} /> ) }