mirror of
https://github.com/navidrome/navidrome.git
synced 2025-05-30 07:09:29 +03:00
Faster display of cover in album detail view
This commit is contained in:
parent
02160465a5
commit
8d608ac5b2
@ -22,7 +22,16 @@ const AlbumDetails = ({ classes, record }) => {
|
|||||||
return genreDateLine.join(' · ')
|
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 handleOpenLightbox = React.useCallback(() => setLightboxOpen(true), [])
|
||||||
const handleCloseLightbox = React.useCallback(
|
const handleCloseLightbox = React.useCallback(
|
||||||
@ -59,7 +68,7 @@ const AlbumDetails = ({ classes, record }) => {
|
|||||||
imagePadding={50}
|
imagePadding={50}
|
||||||
animationDuration={200}
|
animationDuration={200}
|
||||||
imageTitle={record.name}
|
imageTitle={record.name}
|
||||||
mainSrc={imageUrl}
|
mainSrc={fullImageUrl}
|
||||||
onCloseRequest={handleCloseLightbox}
|
onCloseRequest={handleCloseLightbox}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user