Fix Stretched Music Album Covers

This commit is contained in:
Simon Caron
2023-12-09 00:02:19 -05:00
parent 95ab3c0e9d
commit 7ec04efaa0
5 changed files with 17 additions and 7 deletions

View File

@@ -129,7 +129,11 @@ function SessionCard(props) {
<Col className="d-none d-lg-block stat-card-banner">
<Card.Img
variant="top"
className="stat-card-image rounded-0 rounded-start"
className={props.data.session.NowPlayingItem.Type==='Audio' ? (
"stat-card-image-audio rounded-0 rounded-start"
) : (
"stat-card-image rounded-0 rounded-start"
)}
src={"/proxy/Items/Images/Primary?id=" + (props.data.session.NowPlayingItem.SeriesId ? props.data.session.NowPlayingItem.SeriesId : props.data.session.NowPlayingItem.Id) + "&fillHeight=320&fillWidth=213&quality=50"}
/>

View File

@@ -53,7 +53,11 @@ function ItemStatComponent(props) {
)}
{!props.data[0].archived ?
<Card.Img
className="stat-card-image"
className={props.isAudio ? (
"stat-card-image-audio rounded-0 rounded-start"
) : (
"stat-card-image rounded-0 rounded-start"
)}
src={"proxy/Items/Images/Primary?id=" + props.data[0].Id + "&fillWidth=400&quality=90"}
style={{ display: loaded ? 'block' : 'none' }}
onLoad={handleImageLoad}

View File

@@ -69,7 +69,7 @@ function MPMusic(props) {
return (
<ItemStatComponent base_url={config.hostUrl} data={data} heading={"MOST POPULAR MUSIC"} units={"Users"}/>
<ItemStatComponent base_url={config.hostUrl} data={data} heading={"MOST POPULAR MUSIC"} units={"Users"} isAudio={true}/>
);
}

View File

@@ -68,7 +68,7 @@ function MVMovies(props) {
return (
<ItemStatComponent base_url={config.hostUrl} data={data} heading={"MOST LISTENED MUSIC"} units={"Plays"}/>
<ItemStatComponent base_url={config.hostUrl} data={data} heading={"MOST LISTENED MUSIC"} units={"Plays"} isAudio={true}/>
);
}

View File

@@ -22,9 +22,11 @@
max-width: 120px !important;
}
.stat-card-image-audio {
width: 120px !important;
top: 15%;
position: relative;
}
.stat-card-image {
width: 120px !important;