Start working PlayButton and add few missing displays to card #153
This commit is contained in:
6 files changed
+184
-109
No files matched your search
@@ -2,15 +2,63 @@
|
|||||||
|
|
||||||
import IconButton from "@mui/material/IconButton";
|
import IconButton from "@mui/material/IconButton";
|
||||||
import { MdiPlayOutline } from "../icons/mdiPlayOutline";
|
import { MdiPlayOutline } from "../icons/mdiPlayOutline";
|
||||||
|
import { usePlaybackStore } from "../../utils/store/playback";
|
||||||
|
import { useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
const PlayButton = ({ className, sx, iconProps }) => {
|
const PlayButton = ({
|
||||||
|
itemId,
|
||||||
|
mediaSources,
|
||||||
|
currentAudioTrack,
|
||||||
|
currentSubTrack,
|
||||||
|
currentVideoTrack,
|
||||||
|
itemName,
|
||||||
|
seriesName,
|
||||||
|
itemIndex,
|
||||||
|
itemParentIndex,
|
||||||
|
itemRuntimeTicks,
|
||||||
|
itemPlaybackPositionTicks,
|
||||||
|
itemType,
|
||||||
|
className,
|
||||||
|
sx,
|
||||||
|
iconProps,
|
||||||
|
}) => {
|
||||||
|
const navigate = useNavigate();
|
||||||
|
const [
|
||||||
|
setUrl,
|
||||||
|
setPosition,
|
||||||
|
setDuration,
|
||||||
|
setItemId,
|
||||||
|
setItemName,
|
||||||
|
setSubtitleTracksStore,
|
||||||
|
setSelectedSubtitleTrack,
|
||||||
|
] = usePlaybackStore((state) => [
|
||||||
|
state.setUrl,
|
||||||
|
state.setPosition,
|
||||||
|
state.setDuration,
|
||||||
|
state.setItemId,
|
||||||
|
state.setItemName,
|
||||||
|
state.setSubtitleTracks,
|
||||||
|
state.setSelectedSubtitleTrack,
|
||||||
|
]);
|
||||||
|
const handleClick = (e) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
setUrl(
|
||||||
|
`${window.api.basePath}/Videos/${itemId}/stream.${mediaSources[0].Container}?Static=true&mediaSourceId=${itemId}&deviceId=${window.api.deviceInfo.id}&api_key=${window.api.accessToken}&Tag=${mediaSources[0].ETag}&videoStreamIndex=${currentVideoTrack}&audioStreamIndex=${currentAudioTrack}`,
|
||||||
|
);
|
||||||
|
setPosition(itemPlaybackPositionTicks);
|
||||||
|
setItemName(
|
||||||
|
itemType == "Episode"
|
||||||
|
? `${seriesName} S${itemParentIndex}:E${itemIndex} ${itemName}`
|
||||||
|
: itemName,
|
||||||
|
);
|
||||||
|
setItemId(itemId);
|
||||||
|
setDuration(itemRuntimeTicks);
|
||||||
|
// setSubtitleTracksStore(subtitleTracks);
|
||||||
|
setSelectedSubtitleTrack(currentSubTrack);
|
||||||
|
navigate(`/player`);
|
||||||
|
};
|
||||||
return (
|
return (
|
||||||
<IconButton
|
<IconButton className={className} onClick={handleClick} sx={sx}>
|
||||||
className={className}
|
|
||||||
onClick={(e) => e.stopPropagation()}
|
|
||||||
sx={sx}
|
|
||||||
disabled
|
|
||||||
>
|
|
||||||
<MdiPlayOutline {...iconProps} />
|
<MdiPlayOutline {...iconProps} />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -43,19 +43,15 @@ const cardImageAspectRatios = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const Card = ({
|
export const Card = ({
|
||||||
itemId,
|
item,
|
||||||
itemType,
|
cardTitle,
|
||||||
itemName,
|
cardCaption,
|
||||||
isFavorite,
|
|
||||||
isPlayed,
|
|
||||||
imageType = "Primary",
|
imageType = "Primary",
|
||||||
imageBlurhash,
|
imageBlurhash,
|
||||||
cardType,
|
cardType,
|
||||||
secondaryText,
|
|
||||||
queryKey,
|
queryKey,
|
||||||
userId,
|
userId,
|
||||||
availableImagesTypes,
|
availableImagesTypes,
|
||||||
playedProgress = 0,
|
|
||||||
seriesId,
|
seriesId,
|
||||||
|
|
||||||
onClick,
|
onClick,
|
||||||
@@ -64,7 +60,7 @@ export const Card = ({
|
|||||||
const ref = useRef();
|
const ref = useRef();
|
||||||
const isVisible = useIntersecting(ref);
|
const isVisible = useIntersecting(ref);
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const defaultOnClick = () => navigate(`/item/${itemId}`);
|
const defaultOnClick = () => navigate(`/item/${item.Id}`);
|
||||||
return (
|
return (
|
||||||
<CardActionArea
|
<CardActionArea
|
||||||
sx={{ padding: 1, borderRadius: "10px" }}
|
sx={{ padding: 1, borderRadius: "10px" }}
|
||||||
@@ -103,13 +99,16 @@ export const Card = ({
|
|||||||
zIndex: 0,
|
zIndex: 0,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
{!!item.UserData && (
|
||||||
|
<>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
position: "absolute",
|
position: "absolute",
|
||||||
top: "0.4em",
|
top: "0.4em",
|
||||||
right: "0.4em",
|
right: "0.4em",
|
||||||
zIndex: 2,
|
zIndex: 2,
|
||||||
background: "rgb(20 20 20 / 0.5)",
|
background:
|
||||||
|
"rgb(20 20 20 / 0.5)",
|
||||||
padding: "0.2em 0.75em",
|
padding: "0.2em 0.75em",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
@@ -117,12 +116,52 @@ export const Card = ({
|
|||||||
borderRadius: "100px",
|
borderRadius: "100px",
|
||||||
backdropFilter: "blur(5px)",
|
backdropFilter: "blur(5px)",
|
||||||
transition: "opacity 250ms",
|
transition: "opacity 250ms",
|
||||||
opacity: isPlayed ? 1 : 0,
|
opacity: item.UserData
|
||||||
boxShadow: "0 0 5px rgb(0 0 0 / 0.2)",
|
?.IsPlayed
|
||||||
|
? 1
|
||||||
|
: 0,
|
||||||
|
boxShadow:
|
||||||
|
"0 0 5px rgb(0 0 0 / 0.2)",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<MdiCheck />
|
<MdiCheck />
|
||||||
</Box>
|
</Box>
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
position: "absolute",
|
||||||
|
top: "0.4em",
|
||||||
|
right: "0.4em",
|
||||||
|
zIndex: 2,
|
||||||
|
background:
|
||||||
|
"rgb(20 20 20 / 0.5)",
|
||||||
|
padding: "0.2em 0.75em",
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
borderRadius: "100px",
|
||||||
|
backdropFilter: "blur(5px)",
|
||||||
|
transition: "opacity 250ms",
|
||||||
|
opacity: item.UserData
|
||||||
|
?.UnplayedItemCount
|
||||||
|
? 1
|
||||||
|
: 0,
|
||||||
|
boxShadow:
|
||||||
|
"0 0 5px rgb(0 0 0 / 0.2)",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Typography
|
||||||
|
variant="subtitle2"
|
||||||
|
padding="0.1em 0.4em"
|
||||||
|
fontWeight={400}
|
||||||
|
>
|
||||||
|
{
|
||||||
|
item.UserData
|
||||||
|
?.UnplayedItemCount
|
||||||
|
}
|
||||||
|
</Typography>
|
||||||
|
</Box>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
{!!imageBlurhash && (
|
{!!imageBlurhash && (
|
||||||
<Blurhash
|
<Blurhash
|
||||||
hash={imageBlurhash}
|
hash={imageBlurhash}
|
||||||
@@ -134,11 +173,11 @@ export const Card = ({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<Box className="card-image-icon-container">
|
<Box className="card-image-icon-container">
|
||||||
{TypeIconCollectionCard[itemType]}
|
{TypeIconCollectionCard[item.Type]}
|
||||||
</Box>
|
</Box>
|
||||||
<img
|
<img
|
||||||
src={window.api.getItemImageUrl(
|
src={window.api.getItemImageUrl(
|
||||||
!!seriesId ? seriesId : itemId,
|
!!seriesId ? item.SeriesId : item.Id,
|
||||||
imageType,
|
imageType,
|
||||||
{
|
{
|
||||||
quality: 90,
|
quality: 90,
|
||||||
@@ -158,31 +197,53 @@ export const Card = ({
|
|||||||
{!disableOverlay && (
|
{!disableOverlay && (
|
||||||
<Box className="card-overlay">
|
<Box className="card-overlay">
|
||||||
<PlayButton
|
<PlayButton
|
||||||
|
itemId={item.Id}
|
||||||
|
mediaSources={item.MediaSources}
|
||||||
|
currentAudioTrack={0}
|
||||||
|
currentSubTrack={0}
|
||||||
|
currentVideoTrack={0}
|
||||||
|
itemName={item.Name}
|
||||||
|
seriesName={item.SeriesName}
|
||||||
|
itemIndex={item.IndexNumber}
|
||||||
|
itemParentIndex={
|
||||||
|
item.ParentIndexNumber
|
||||||
|
}
|
||||||
|
itemRuntimeTicks={
|
||||||
|
!!item.MediaSources &&
|
||||||
|
item.MediaSources[0]
|
||||||
|
.RunTimeTicks
|
||||||
|
}
|
||||||
|
itemPlaybackPositionTicks={
|
||||||
|
item.UserData
|
||||||
|
?.PlaybackPositionTicks
|
||||||
|
}
|
||||||
className="card-play-button"
|
className="card-play-button"
|
||||||
iconProps={{
|
iconProps={{
|
||||||
sx: { fontSize: "1.5em" },
|
sx: { fontSize: "1.5em" },
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<LikeButton
|
<LikeButton
|
||||||
itemId={itemId}
|
itemId={item.Id}
|
||||||
itemName={itemName}
|
itemName={item.Name}
|
||||||
isFavorite={isFavorite}
|
isFavorite={
|
||||||
|
item.UserData?.IsFavorite
|
||||||
|
}
|
||||||
queryKey={queryKey}
|
queryKey={queryKey}
|
||||||
userId={userId}
|
userId={userId}
|
||||||
/>
|
/>
|
||||||
<MarkPlayedButton
|
<MarkPlayedButton
|
||||||
itemId={itemId}
|
itemId={item.Id}
|
||||||
itemName={itemName}
|
itemName={item.Name}
|
||||||
isPlayed={isPlayed}
|
isPlayed={item.UserData.IsPlayed}
|
||||||
queryKey={queryKey}
|
queryKey={queryKey}
|
||||||
userId={userId}
|
userId={userId}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
{playedProgress != 0 && (
|
{Boolean(item.UserData?.PlayedPercentage) && (
|
||||||
<LinearProgress
|
<LinearProgress
|
||||||
variant="determinate"
|
variant="determinate"
|
||||||
value={playedProgress}
|
value={item.UserData.PlayedPercentage}
|
||||||
sx={{
|
sx={{
|
||||||
position: "absolute",
|
position: "absolute",
|
||||||
left: 0,
|
left: 0,
|
||||||
@@ -206,7 +267,7 @@ export const Card = ({
|
|||||||
textAlign="center"
|
textAlign="center"
|
||||||
sx={{ opacity: 0.9 }}
|
sx={{ opacity: 0.9 }}
|
||||||
>
|
>
|
||||||
{itemName}
|
{cardTitle}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography
|
<Typography
|
||||||
variant="subtitle2"
|
variant="subtitle2"
|
||||||
@@ -215,7 +276,7 @@ export const Card = ({
|
|||||||
sx={{ opacity: 0.6 }}
|
sx={{ opacity: 0.6 }}
|
||||||
lineHeight="auto"
|
lineHeight="auto"
|
||||||
>
|
>
|
||||||
{secondaryText}
|
{cardCaption}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
@@ -45,23 +45,16 @@ export const LatestMediaSection = ({ latestMediaLib }) => {
|
|||||||
{data.data.map((item, index) => {
|
{data.data.map((item, index) => {
|
||||||
return (
|
return (
|
||||||
<Card
|
<Card
|
||||||
key={index}
|
key={item.Id}
|
||||||
itemName={
|
item={item}
|
||||||
|
seriesId={item.SeriesId}
|
||||||
|
cardTitle={
|
||||||
item.Type == BaseItemKind.Episode
|
item.Type == BaseItemKind.Episode
|
||||||
? item.SeriesName
|
? item.SeriesName
|
||||||
: item.Name
|
: item.Name
|
||||||
}
|
}
|
||||||
itemId={item.Id}
|
imageType={"Primary"}
|
||||||
seriesId={item.SeriesId}
|
cardCaption={
|
||||||
itemType={item.Type}
|
|
||||||
imageType="Primary"
|
|
||||||
cardType={
|
|
||||||
item.Type == BaseItemKind.MusicAlbum ||
|
|
||||||
item.Type == BaseItemKind.Audio
|
|
||||||
? "square"
|
|
||||||
: "portrait"
|
|
||||||
}
|
|
||||||
secondaryText={
|
|
||||||
item.Type == BaseItemKind.Episode
|
item.Type == BaseItemKind.Episode
|
||||||
? `S${item.ParentIndexNumber}:E${item.IndexNumber} - ${item.Name}`
|
? `S${item.ParentIndexNumber}:E${item.IndexNumber} - ${item.Name}`
|
||||||
: item.Type == BaseItemKind.Series
|
: item.Type == BaseItemKind.Series
|
||||||
@@ -79,12 +72,16 @@ export const LatestMediaSection = ({ latestMediaLib }) => {
|
|||||||
}`
|
}`
|
||||||
: item.ProductionYear
|
: item.ProductionYear
|
||||||
}
|
}
|
||||||
isFavorite={item.UserData.IsFavorite}
|
cardType={
|
||||||
|
item.Type == BaseItemKind.MusicAlbum ||
|
||||||
|
item.Type == BaseItemKind.Audio
|
||||||
|
? "square"
|
||||||
|
: "portrait"
|
||||||
|
}
|
||||||
queryKey={[
|
queryKey={[
|
||||||
"homeSection, latestMedia",
|
"homeSection, latestMedia",
|
||||||
latestMediaLib,
|
latestMediaLib,
|
||||||
]}
|
]}
|
||||||
isPlayed={item.UserData.Played}
|
|
||||||
userId={user.data.Id}
|
userId={user.data.Id}
|
||||||
imageBlurhash={
|
imageBlurhash={
|
||||||
item.ImageBlurHashes?.Primary[
|
item.ImageBlurHashes?.Primary[
|
||||||
@@ -93,9 +90,6 @@ export const LatestMediaSection = ({ latestMediaLib }) => {
|
|||||||
)[0]
|
)[0]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
playedProgress={
|
|
||||||
item.UserData.PlayedPercentage
|
|
||||||
}
|
|
||||||
></Card>
|
></Card>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|||||||
+25
-60
@@ -103,6 +103,8 @@ const Home = () => {
|
|||||||
"ParentIndexNumber",
|
"ParentIndexNumber",
|
||||||
ItemFields.SeasonUserData,
|
ItemFields.SeasonUserData,
|
||||||
ItemFields.IsHd,
|
ItemFields.IsHd,
|
||||||
|
ItemFields.MediaStreams,
|
||||||
|
ItemFields.MediaSources,
|
||||||
],
|
],
|
||||||
enableUserData: true,
|
enableUserData: true,
|
||||||
enableImages: true,
|
enableImages: true,
|
||||||
@@ -123,6 +125,10 @@ const Home = () => {
|
|||||||
limit: 10,
|
limit: 10,
|
||||||
mediaTypes: ["Video"],
|
mediaTypes: ["Video"],
|
||||||
enableUserData: true,
|
enableUserData: true,
|
||||||
|
fields: [
|
||||||
|
ItemFields.MediaStreams,
|
||||||
|
ItemFields.MediaSources,
|
||||||
|
],
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
return resumeItems.data;
|
return resumeItems.data;
|
||||||
@@ -140,6 +146,10 @@ const Home = () => {
|
|||||||
limit: 10,
|
limit: 10,
|
||||||
mediaTypes: ["Audio"],
|
mediaTypes: ["Audio"],
|
||||||
enableUserData: true,
|
enableUserData: true,
|
||||||
|
fields: [
|
||||||
|
ItemFields.MediaStreams,
|
||||||
|
ItemFields.MediaSources,
|
||||||
|
],
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
return resumeItems.data;
|
return resumeItems.data;
|
||||||
@@ -155,6 +165,8 @@ const Home = () => {
|
|||||||
userId: user.data.Id,
|
userId: user.data.Id,
|
||||||
fields: [
|
fields: [
|
||||||
ItemFields.PrimaryImageAspectRatio,
|
ItemFields.PrimaryImageAspectRatio,
|
||||||
|
ItemFields.MediaStreams,
|
||||||
|
ItemFields.MediaSources,
|
||||||
ItemFields.ParentId,
|
ItemFields.ParentId,
|
||||||
],
|
],
|
||||||
limit: 10,
|
limit: 10,
|
||||||
@@ -252,9 +264,10 @@ const Home = () => {
|
|||||||
return (
|
return (
|
||||||
<Card
|
<Card
|
||||||
key={item.Id}
|
key={item.Id}
|
||||||
itemName={item.Name}
|
item={item}
|
||||||
itemId={item.Id}
|
cardTitle={
|
||||||
itemType="Library"
|
item.Name
|
||||||
|
}
|
||||||
imageType="Primary"
|
imageType="Primary"
|
||||||
cardType="thumb"
|
cardType="thumb"
|
||||||
disableOverlay
|
disableOverlay
|
||||||
@@ -292,14 +305,13 @@ const Home = () => {
|
|||||||
return (
|
return (
|
||||||
<Card
|
<Card
|
||||||
key={item.Id}
|
key={item.Id}
|
||||||
itemName={
|
item={item}
|
||||||
|
cardTitle={
|
||||||
item.Type ==
|
item.Type ==
|
||||||
BaseItemKind.Episode
|
BaseItemKind.Episode
|
||||||
? item.SeriesName
|
? item.SeriesName
|
||||||
: item.Name
|
: item.Name
|
||||||
}
|
}
|
||||||
itemId={item.Id}
|
|
||||||
itemType={item.Type}
|
|
||||||
imageType={
|
imageType={
|
||||||
item.Type ==
|
item.Type ==
|
||||||
BaseItemKind.Episode
|
BaseItemKind.Episode
|
||||||
@@ -312,7 +324,7 @@ const Home = () => {
|
|||||||
? "Thumb"
|
? "Thumb"
|
||||||
: "Backdrop"
|
: "Backdrop"
|
||||||
}
|
}
|
||||||
secondaryText={
|
cardCaption={
|
||||||
item.Type ==
|
item.Type ==
|
||||||
BaseItemKind.Episode
|
BaseItemKind.Episode
|
||||||
? `S${item.ParentIndexNumber}:E${item.IndexNumber} - ${item.Name}`
|
? `S${item.ParentIndexNumber}:E${item.IndexNumber} - ${item.Name}`
|
||||||
@@ -335,17 +347,10 @@ const Home = () => {
|
|||||||
: item.ProductionYear
|
: item.ProductionYear
|
||||||
}
|
}
|
||||||
cardType="thumb"
|
cardType="thumb"
|
||||||
isFavorite={
|
|
||||||
item.UserData
|
|
||||||
.IsFavorite
|
|
||||||
}
|
|
||||||
queryKey={[
|
queryKey={[
|
||||||
"home",
|
"home",
|
||||||
"upNext",
|
"upNext",
|
||||||
]}
|
]}
|
||||||
isPlayed={
|
|
||||||
item.UserData.Played
|
|
||||||
}
|
|
||||||
userId={user.data.Id}
|
userId={user.data.Id}
|
||||||
imageBlurhash={
|
imageBlurhash={
|
||||||
item.ImageBlurHashes
|
item.ImageBlurHashes
|
||||||
@@ -357,16 +362,6 @@ const Home = () => {
|
|||||||
)[0]
|
)[0]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
availableImagesTypes={
|
|
||||||
!!item.ImageTags &&
|
|
||||||
Object.keys(
|
|
||||||
item.ImageTags,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
playedProgress={
|
|
||||||
item.UserData
|
|
||||||
.PlayedPercentage
|
|
||||||
}
|
|
||||||
></Card>
|
></Card>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@@ -387,14 +382,13 @@ const Home = () => {
|
|||||||
return (
|
return (
|
||||||
<Card
|
<Card
|
||||||
key={item.Id}
|
key={item.Id}
|
||||||
itemName={
|
item={item}
|
||||||
|
cardTitle={
|
||||||
item.Type ==
|
item.Type ==
|
||||||
BaseItemKind.Episode
|
BaseItemKind.Episode
|
||||||
? item.SeriesName
|
? item.SeriesName
|
||||||
: item.Name
|
: item.Name
|
||||||
}
|
}
|
||||||
itemId={item.Id}
|
|
||||||
itemType={item.Type}
|
|
||||||
imageType={
|
imageType={
|
||||||
item.Type ==
|
item.Type ==
|
||||||
BaseItemKind.Episode
|
BaseItemKind.Episode
|
||||||
@@ -407,7 +401,7 @@ const Home = () => {
|
|||||||
? "Thumb"
|
? "Thumb"
|
||||||
: "Backdrop"
|
: "Backdrop"
|
||||||
}
|
}
|
||||||
secondaryText={
|
cardCaption={
|
||||||
item.Type ==
|
item.Type ==
|
||||||
BaseItemKind.Episode
|
BaseItemKind.Episode
|
||||||
? `S${item.ParentIndexNumber}:E${item.IndexNumber} - ${item.Name}`
|
? `S${item.ParentIndexNumber}:E${item.IndexNumber} - ${item.Name}`
|
||||||
@@ -430,18 +424,11 @@ const Home = () => {
|
|||||||
: item.ProductionYear
|
: item.ProductionYear
|
||||||
}
|
}
|
||||||
cardType="thumb"
|
cardType="thumb"
|
||||||
isFavorite={
|
|
||||||
item.UserData
|
|
||||||
.IsFavorite
|
|
||||||
}
|
|
||||||
queryKey={[
|
queryKey={[
|
||||||
"home",
|
"home",
|
||||||
"resume",
|
"resume",
|
||||||
"video",
|
"video",
|
||||||
]}
|
]}
|
||||||
isPlayed={
|
|
||||||
item.UserData.Played
|
|
||||||
}
|
|
||||||
userId={user.data.Id}
|
userId={user.data.Id}
|
||||||
imageBlurhash={
|
imageBlurhash={
|
||||||
item.ImageBlurHashes
|
item.ImageBlurHashes
|
||||||
@@ -453,16 +440,6 @@ const Home = () => {
|
|||||||
)[0]
|
)[0]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
availableImagesTypes={
|
|
||||||
!!item.ImageTags &&
|
|
||||||
Object.keys(
|
|
||||||
item.ImageTags,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
playedProgress={
|
|
||||||
item.UserData
|
|
||||||
.PlayedPercentage
|
|
||||||
}
|
|
||||||
></Card>
|
></Card>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@@ -483,9 +460,8 @@ const Home = () => {
|
|||||||
return (
|
return (
|
||||||
<Card
|
<Card
|
||||||
key={item.Id}
|
key={item.Id}
|
||||||
itemName={item.Name}
|
item={item}
|
||||||
itemId={item.Id}
|
cardTitle={item.Name}
|
||||||
itemType={item.Type}
|
|
||||||
imageType={
|
imageType={
|
||||||
item.Type ==
|
item.Type ==
|
||||||
BaseItemKind.Episode
|
BaseItemKind.Episode
|
||||||
@@ -498,22 +474,15 @@ const Home = () => {
|
|||||||
? "Thumb"
|
? "Thumb"
|
||||||
: "Backdrop"
|
: "Backdrop"
|
||||||
}
|
}
|
||||||
secondaryText={
|
cardCaption={
|
||||||
item.ProductionYear
|
item.ProductionYear
|
||||||
}
|
}
|
||||||
cardType="thumb"
|
cardType="thumb"
|
||||||
isFavorite={
|
|
||||||
item.UserData
|
|
||||||
.IsFavorite
|
|
||||||
}
|
|
||||||
queryKey={[
|
queryKey={[
|
||||||
"home",
|
"home",
|
||||||
"resume",
|
"resume",
|
||||||
"audio",
|
"audio",
|
||||||
]}
|
]}
|
||||||
isPlayed={
|
|
||||||
item.UserData.Played
|
|
||||||
}
|
|
||||||
userId={user.data.Id}
|
userId={user.data.Id}
|
||||||
imageBlurhash={
|
imageBlurhash={
|
||||||
item.ImageBlurHashes
|
item.ImageBlurHashes
|
||||||
@@ -525,10 +494,6 @@ const Home = () => {
|
|||||||
)[0]
|
)[0]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
playedProgress={
|
|
||||||
item.UserData
|
|
||||||
.PlayedPercentage
|
|
||||||
}
|
|
||||||
></Card>
|
></Card>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ export const VideoPlayer = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
className="video"
|
className="video-player-container"
|
||||||
sx={{ background: "black" }}
|
sx={{ background: "black" }}
|
||||||
onMouseMove={() => {
|
onMouseMove={() => {
|
||||||
setShowControls(true);
|
setShowControls(true);
|
||||||
|
|||||||
@@ -8,6 +8,13 @@
|
|||||||
&-osd-visible &-osd {
|
&-osd-visible &-osd {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
&-player-container {
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
video {
|
video {
|
||||||
|
|||||||
Reference in new issue
Block a user