Faster display of cover in album detail view

This commit is contained in:
Deluan 2020-11-07 22:45:04 -05:00 committed by Joe Stump
parent f1ba2a3244
commit 5a5e3002f7
No known key found for this signature in database
GPG Key ID: 29151C3EC48A0EB9

View File

@ -22,7 +22,16 @@ const AlbumDetails = ({ classes, record }) => {
return genreDateLine.join(' · ')
}
const imageUrl = subsonic.url('getCoverArt', record.coverArtId || 'not_found')
const imageUrl = subsonic.url(
'getCoverArt',
record.coverArtId || 'not_found',
{ size: 300 }
)
const fullImageUrl = subsonic.url(
'getCoverArt',
record.coverArtId || 'not_found'
)
const handleOpenLightbox = React.useCallback(() => setLightboxOpen(true), [])
const handleCloseLightbox = React.useCallback(
@ -59,7 +68,7 @@ const AlbumDetails = ({ classes, record }) => {
imagePadding={50}
animationDuration={200}
imageTitle={record.name}
mainSrc={imageUrl}
mainSrc={fullImageUrl}
onCloseRequest={handleCloseLightbox}
/>
)}