Fix artist image not caching on browser
This commit is contained in:
@@ -12,6 +12,7 @@ import { AddToPlaylistDialog } from '../dialogs'
|
||||
import ExpandInfoDialog from '../dialogs/ExpandInfoDialog'
|
||||
import AlbumInfo from '../album/AlbumInfo'
|
||||
import DownloadMenuDialog from '../dialogs/DownloadMenuDialog'
|
||||
import subsonic from '../subsonic'
|
||||
|
||||
const useStyles = makeStyles(
|
||||
(theme) => ({
|
||||
@@ -70,9 +71,9 @@ const useStyles = makeStyles(
|
||||
{ name: 'NDDesktopArtistDetails' }
|
||||
)
|
||||
|
||||
const DesktopArtistDetails = ({ img, artistInfo, record, biography }) => {
|
||||
const DesktopArtistDetails = ({ artistInfo, record, biography }) => {
|
||||
const [expanded, setExpanded] = useState(false)
|
||||
const classes = useStyles({ img, expanded })
|
||||
const classes = useStyles()
|
||||
const title = record.name
|
||||
const [isLightboxOpen, setLightboxOpen] = React.useState(false)
|
||||
|
||||
@@ -89,7 +90,7 @@ const DesktopArtistDetails = ({ img, artistInfo, record, biography }) => {
|
||||
{artistInfo && (
|
||||
<CardMedia
|
||||
className={classes.cover}
|
||||
image={artistInfo.mediumImageUrl}
|
||||
image={subsonic.getCoverArtUrl(record, 300)}
|
||||
onClick={handleOpenLightbox}
|
||||
title={title}
|
||||
/>
|
||||
@@ -103,16 +104,15 @@ const DesktopArtistDetails = ({ img, artistInfo, record, biography }) => {
|
||||
className={classes.artistName}
|
||||
>
|
||||
{title}
|
||||
{config.enableFavourites && (
|
||||
<ArtistContextMenu
|
||||
className={classes.contextMenu}
|
||||
record={record}
|
||||
resource={'artist'}
|
||||
size={'default'}
|
||||
aria-label="artist context menu"
|
||||
color="primary"
|
||||
/>
|
||||
)}
|
||||
<ArtistContextMenu
|
||||
showLove={config.enableFavourites}
|
||||
className={classes.contextMenu}
|
||||
record={record}
|
||||
resource={'artist'}
|
||||
size={'default'}
|
||||
aria-label="artist context menu"
|
||||
color="primary"
|
||||
/>
|
||||
</Typography>
|
||||
{config.enableStarRating && (
|
||||
<div>
|
||||
@@ -147,7 +147,7 @@ const DesktopArtistDetails = ({ img, artistInfo, record, biography }) => {
|
||||
imagePadding={50}
|
||||
animationDuration={200}
|
||||
imageTitle={record.name}
|
||||
mainSrc={artistInfo.largeImageUrl}
|
||||
mainSrc={subsonic.getCoverArtUrl(record)}
|
||||
onCloseRequest={handleCloseLightbox}
|
||||
/>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user