diff --git a/src/App.jsx b/src/App.jsx
index ce10953..901d1e8 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -40,7 +40,7 @@ import DialogContentText from "@mui/material/DialogContentText";
import DialogTitle from "@mui/material/DialogTitle";
import Button from "@mui/material/Button";
import Box from "@mui/material/Box";
-import CircularProgress from "@mui/material/CircularProgress";
+import Stack from "@mui/material/Stack";
// Routes
import { ServerSetup, ServerList } from "./routes/setup/server";
@@ -72,6 +72,9 @@ import { delServer, getServer } from "./utils/storage/servers.js";
import { delUser, getUser } from "./utils/storage/user.js";
import axios from "axios";
+import { Blurhash } from "react-blurhash";
+import zIndex from "@mui/material/styles/zIndex.js";
+import { useBackdropStore } from "./utils/store/backdrop.js";
const jellyfin = new Jellyfin({
clientInfo: {
@@ -121,6 +124,9 @@ const AnimationWrapper = () => {
transition={{
duration: 0.35,
}}
+ style={{
+ width: "100%",
+ }}
>
@@ -278,9 +284,33 @@ function App() {
appWindow.setFullscreen(false);
}, [location]);
+ const [hash] = useBackdropStore((state) => [state.hash]);
+
return (
+
+
+
-
-
-
-
+
+
+
);
diff --git a/src/components/appBar/appBar.jsx b/src/components/appBar/appBar.jsx
index 2369925..4d877db 100644
--- a/src/components/appBar/appBar.jsx
+++ b/src/components/appBar/appBar.jsx
@@ -87,11 +87,11 @@ export const AppBar = () => {
return (
{
open={false}
PaperProps={{
sx: {
- backgroundColor: "inherit",
+ backgroundColor: "transparent",
border: "none",
width: `calc(${theme.spacing(7)} + 10px)`,
- height: "100vh",
- // display: visible ? "block" : "none",
+ height: "100%",
+ position: "inherit",
},
}}
sx={{
width: `calc(${theme.spacing(7)} + 10px)`,
- background: theme.palette.background.paper,
+ background: "transparent",
}}
>
-
- {/* */}
-
-
-
-
-
{libraries.isLoading ? (
<>
{
className="scrollY"
sx={{
flexGrow: 1,
- pt: 11,
- px: 3,
- pb: 3,
position: "relative",
}}
>
diff --git a/src/routes/home/index.jsx b/src/routes/home/index.jsx
index 6898a75..0baf1aa 100644
--- a/src/routes/home/index.jsx
+++ b/src/routes/home/index.jsx
@@ -204,9 +204,6 @@ const Home = () => {
className="scrollY"
sx={{
flexGrow: 1,
- pt: 11,
- px: 3,
- pb: 3,
position: "relative",
}}
>
diff --git a/src/routes/item/index.jsx b/src/routes/item/index.jsx
index 4538a75..14d3347 100644
--- a/src/routes/item/index.jsx
+++ b/src/routes/item/index.jsx
@@ -66,6 +66,7 @@ import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
import { ArtistAlbum } from "../../components/layouts/artist/artistAlbum";
import { MdiMusic } from "../../components/icons/mdiMusic";
import { usePlaybackStore } from "../../utils/store/playback";
+import { useBackdropStore } from "../../utils/store/backdrop";
function TabPanel(props) {
const { children, value, index, ...other } = props;
@@ -518,8 +519,12 @@ const ItemDetail = () => {
state.setDuration,
state.setItemId,
state.setItemName,
+ state.setItemName,
+ ,
]);
+ const [setHash] = useBackdropStore((state) => [state.setHash]);
+
const [directors, setDirectors] = useState([]);
const [writers, setWriters] = useState([]);
useEffect(() => {
@@ -532,9 +537,31 @@ const ItemDetail = () => {
(itm) => itm.Type == "Writer",
);
setWriters(writeTp);
+
+ if (!!item.data.ParentBackdropImageTags) {
+ setHash(
+ item.data.ImageBlurHashes.Backdrop[
+ item.data.ParentBackdropImageTags[0]
+ ],
+ );
+ } else if (item.data.BackdropImageTags.length != 0) {
+ setHash(
+ item.data.ImageBlurHashes.Backdrop[
+ item.data.BackdropImageTags[0]
+ ],
+ );
+ } else {
+ setHash("LGJCbc|t1s1}1{JU|y,uAo=3,s$Q");
+ }
}
}, [item.isSuccess]);
+ const [crew, setCrew] = useState([]);
+
+ useEffect(() => {
+ setCrew(directors.concat(...writers));
+ }, [writers, directors]);
+
if (item.isLoading || similarItems.isLoading) {
return (
{
if (item.isSuccess && similarItems.isSuccess) {
return (
<>
-
- {item.data.BackdropImageTags.length != 0 && (
-
- )}
- {!!item.data.ParentBackdropImageTags &&
- item.data.ParentBackdropImageTags.length != 0 && (
-
- )}
-
{
-
+ {/*
{item.data.Type != BaseItemKind.MusicAlbum &&
item.data.Type != BaseItemKind.Episode
? item.data.BackdropImageTags.length !=
@@ -691,7 +670,7 @@ const ItemDetail = () => {
>
{TypeIconCollectionCard[item.data.Type]}
-
+ */}
{
item.data.Type ===
BaseItemKind.Episode
? "center !important"
- : "flex-end",
+ : "flex-start",
justifyContent: "flex-start",
width: "100%",
}}
@@ -788,351 +767,420 @@ const ItemDetail = () => {
}
-
- {item.data.Type ===
- BaseItemKind.Episode && (
-
- {!!item.data
- .ParentLogoItemId ? (
-
- ) : (
- item.data.SeriesName
- )}
-
- )}
- {item.data.Type ===
- BaseItemKind.Episode ? (
-
- {`S${item.data.ParentIndexNumber}:E${item.data.IndexNumber} - ${item.data.Name}`}
-
- ) : (
-
- {!!item.data.ImageTags
- .Logo ? (
-
- ) : (
- item.data.Name
- )}
-
- )}
-
- {item.data.OriginalTitle}
-
- {!!item.data.AlbumArtists && (
-
- ,
-
- }
- >
- {item.data.AlbumArtists.map(
- (
- artist,
- aindex,
- ) => {
- return (
-
- {
- artist.Name
- }
-
- );
- },
- )}
-
- )}
-
-
- }
sx={{
- alignItems: "center",
- width: "100%",
+ display: "flex",
+ flexDirection: "column",
}}
>
- {item.data.Type != "MusicArtist" &&
- item.data.ProductionYear && (
-
- {
- item.data
- .ProductionYear
+
+ {item.data.Type ===
+ BaseItemKind.Episode && (
+
+ {!!item.data
+ .ParentLogoItemId ? (
+
+ ) : (
+ item.data
+ .SeriesName
+ )}
+
+ )}
+ {item.data.Type ===
+ BaseItemKind.Episode ? (
+
+ {`S${item.data.ParentIndexNumber}:E${item.data.IndexNumber} - ${item.data.Name}`}
+
+ ) : (
+
+ {!!item.data
+ .ImageTags
+ .Logo ? (
+
+ ) : (
+ item.data.Name
+ )}
)}
- {item.data.Type !=
- "MusicArtist" && (
-
- )}
- {item.data.Type !=
- "MusicArtist" && (
-
- {!!item.data
- .CommunityRating ? (
- <>
-
-
- {Math.round(
- item
- .data
- .CommunityRating *
- 10,
- ) / 10}
+ {item.data.OriginalTitle}
+
+ {!!item.data.AlbumArtists && (
+
+ ,
- >
- ) : (
-
- No Community
- Rating
+ }
+ >
+ {item.data.AlbumArtists.map(
+ (
+ artist,
+ aindex,
+ ) => {
+ return (
+
+ {
+ artist.Name
+ }
+
+ );
+ },
+ )}
+
+ )}
+
+
+ }
+ sx={{
+ alignItems: "center",
+ width: "100%",
+ }}
+ >
+ {item.data.Type !=
+ "MusicArtist" &&
+ item.data
+ .ProductionYear && (
+
+ {
+ item.data
+ .ProductionYear
+ }
)}
-
- )}
- {!!item.data.RunTimeTicks && (
-
- {getRuntimeFull(
- item.data
- .RunTimeTicks,
- )}
-
- )}
- {!!item.data.RunTimeTicks && (
-
- {endsAt(
- item.data
- .RunTimeTicks,
- )}
-
- )}
-
-
-
- {item.data.Type != "Person" &&
- !item.data.Type.includes(
- "Music",
- ) && (
- <>
-
+ {item.data.Type !=
+ "MusicArtist" && (
+
+ )}
+ {item.data.Type !=
+ "MusicArtist" && (
+ {
- if (
- !!item
- .data
- .VideoType
- ) {
- setUrl(
- `${window.api.basePath}/Videos/${item.data.Id}/stream.${item.data.MediaSources[0].Container}?Static=true&mediaSourceId=${item.data.Id}&deviceId=${window.api.deviceInfo.id}&api_key=${window.api.accessToken}&Tag=${item.data.MediaSources[0].ETag}`,
- );
- setPosition(
- item
- .data
- .UserData
- .PlaybackPositionTicks,
- );
- setItemName(
- item
- .data
- .Name,
- );
- setItemId(
- item
- .data
- .Id,
- );
- setDuration(
- item
- .data
- .RunTimeTicks,
- );
- }
- navigate(
- `/player`,
- );
+ display: "flex",
+ gap: "0.25em",
+ alignItems:
+ "center",
}}
+ className="item-detail-info-rating"
>
{!!item.data
- .UserData
- .PlayedPercentage &&
- item.data.UserData
- .PlayedPercentage >
- 0
- ? "Resume"
- : "Play"}
- {!!item.data
- .UserData
- .PlayedPercentage && (
-
+
+
+ {Math.round(
+ item
+ .data
+ .CommunityRating *
+ 10,
+ ) /
+ 10}
+
+ >
+ ) : (
+
+ No
+ Community
+ Rating
+
+ )}
+
+ )}
+ {!!item.data.RunTimeTicks && (
+
+ {getRuntimeFull(
+ item.data
+ .RunTimeTicks,
+ )}
+
+ )}
+ {!!item.data.RunTimeTicks && (
+
+ {endsAt(
+ item.data
+ .RunTimeTicks,
+ )}
+
+ )}
+
+
+
+
+ {item.data.Taglines[0]}
+
+
+ {item.data.Genres.length != 0 && (
+
+ {item.data.Genres.map(
+ (genre, index) => {
+ return (
+
+ );
+ },
+ )}
+
+ )}
+ {!!item.data.Overview && (
+
+
+ {item.data.Overview}
+
+
+ )}
+
+ {item.data.Type != "Person" &&
+ !item.data.Type.includes(
+ "Music",
+ ) && (
+ <>
+
+ }
+ sx={{
+ position:
+ "relative",
+ overflow:
+ "hidden",
+ }}
+ onClick={() => {
+ if (
+ !!item
+ .data
+ .VideoType
+ ) {
+ setUrl(
+ `${window.api.basePath}/Videos/${item.data.Id}/stream.${item.data.MediaSources[0].Container}?Static=true&mediaSourceId=${item.data.Id}&deviceId=${window.api.deviceInfo.id}&api_key=${window.api.accessToken}&Tag=${item.data.MediaSources[0].ETag}`,
+ );
+ setPosition(
+ item
+ .data
+ .UserData
+ .PlaybackPositionTicks,
+ );
+ setItemName(
+ item
+ .data
+ .Name,
+ );
+ setItemId(
+ item
+ .data
+ .Id,
+ );
+ setDuration(
+ item
+ .data
+ .RunTimeTicks,
+ );
+ if (
+ subtitleTracks.length !=
+ 0
+ ) {
+ // setSubtitleTracks(
+ // {
+ // kind: "subtitles",
+ // src: `http://localhost:8096/Videos/e2d0ae00-f458-d4d4-7e09-1768ca0f485c/e2d0ae00f458d4d47e091768ca0f485c/Subtitles/0/0/Stream.vtt?api_key=${window.api.accessToken}`,
+ // srcLang: "en",
+ // default: true,
+ // },
+ // );
+ setSubtitleTracks();
+ }
+ }
+ navigate(
+ `/player`,
+ );
+ }}
+ >
+ {!!item.data
+ .UserData
+ .PlayedPercentage &&
+ item.data
+ .UserData
+ .PlayedPercentage >
+ 0
+ ? "Resume"
+ : "Play"}
+ {!!item.data
+ .UserData
+ .PlayedPercentage && (
+
+ )}
+
+
+
+
- )}
-
-
-
-
-
- >
- )}
-
- {item.data.UserData.IsFavorite ? (
-
- ) : (
-
- )}
-
+
+ >
+ )}
+
+ {item.data.UserData
+ .IsFavorite ? (
+
+ ) : (
+
+ )}
+
+
-
-
-
- {item.data.Taglines[0]}
-
-
- {item.data.Genres != 0 && (
+ {/* {item.data.Genres != 0 && (
{
- )}
+ )} */}
{item.data.ExternalUrls.length != 0 && (
{
- {!!item.data.Overview && (
-
-
- Overview
-
-
- {item.data.Overview}
-
-
- )}
{item.data.Type == BaseItemKind.MusicAlbum && (
{
label={
episodes.isLoading ? (
) : (
episodes.data
@@ -2753,7 +2789,7 @@ const ItemDetail = () => {
duration: 0.35,
delay:
mindex *
- 0.1,
+ 0.03,
}}
>
{
variant: "h5",
fontSize: "1.8em",
}}
- displayCards={8}
+ displayCards={12}
title="Cast"
disableDecoration
boxProps={{
diff --git a/src/routes/item/item.module.scss b/src/routes/item/item.module.scss
index 6d24093..1222a47 100644
--- a/src/routes/item/item.module.scss
+++ b/src/routes/item/item.module.scss
@@ -17,7 +17,7 @@
display: flex;
gap: 1em;
justify-content: flex-start;
- align-items: flex-end;
+ align-items: flex-start;
position: relative;
flex-wrap: wrap;
&-backdrop {
@@ -30,11 +30,11 @@
left: -24px;
z-index: -2;
filter: brightness(0.6);
- mask-image: linear-gradient(0deg, transparent, black 75%);
+ mask-image: linear-gradient(to bottom, black 75%, transparent);
-webkit-mask-image: linear-gradient(
- 0deg,
- transparent,
- black 75%
+ to bottom,
+ black 75%,
+ transparent
);
}
}
@@ -49,7 +49,7 @@
z-index: -1;
}
&-container {
- width: 15%;
+ width: 20%;
flex-shrink: 0;
position: relative;
border-radius: $border-radius-default;
diff --git a/src/routes/library/index.jsx b/src/routes/library/index.jsx
index a497a75..dbe8b66 100644
--- a/src/routes/library/index.jsx
+++ b/src/routes/library/index.jsx
@@ -452,144 +452,193 @@ const LibraryView = () => {
-
-
-
-
-
-
- {currentLib.isLoading ? (
-
+ />
+
+
+
+ {currentLib.isLoading ? (
+
+ ) : (
+ currentLib.data.Items[0].Name
+ )}
+
+
) : (
- currentLib.data.Items[0].Name
- )}
-
-
- ) : (
- items.data.TotalRecordCount
- )
- }
- />
-
+ items.data.TotalRecordCount
+ )
+ }
+ />
+
- {/*
+ {/*
Age
*/}
-
- }
- >
- {currentLib.isSuccess &&
- allowedFilterViews.includes(
- currentLib.data.Items[0]
- .CollectionType,
- ) && (
- <>
-
- }
- endIcon={
-
- }
- onClick={openFiltersMenu}
- color="white"
- // sx={{ p: 1 }}
- // size="small"
- >
- Filter
-
-
>
)}
- {viewType.length != 0 &&
- currentViewType != undefined && (
-
- {viewType.map(
- (item, index) => {
- return (
-
- );
- },
- )}
-
- )}
-
-
-
- {items.isLoading || items.isFetching ? (
-
-
+ {sortByData != undefined &&
+ sortBy != undefined && (
+ <>
+
+ }
+ checkedIcon={
+
+ }
+ sx={{
+ color: "white !important",
+ }}
+ color="white"
+ onChange={
+ handleSortChange
+ }
+ checked={
+ sortAscending
+ }
+ />
+
+ {sortByData.map(
+ (
+ item,
+ index,
+ ) => {
+ return (
+
+ );
+ },
+ )}
+
+ >
+ )}
+ >
+ )}
+ {viewType.length != 0 &&
+ currentViewType != undefined && (
+
+ {viewType.map((item, index) => {
+ return (
+
+ );
+ })}
+
+ )}
+
+
+
+
+
+ {items.isLoading || items.isFetching ? (
+
-
- ) : items.data.TotalRecordCount == 0 ? (
-
- ) : currentViewType != BaseItemKind.Audio ? (
-
- {items.data.Items.map((item, index) => {
- return (
-
-
+
+
+ ) : items.data.TotalRecordCount == 0 ? (
+
+ ) : currentViewType != BaseItemKind.Audio ? (
+
+ {items.data.Items.map((item, index) => {
+ return (
+
+
-
- );
- })}
-
- ) : (
-
-
-
- {items.data.Items.map((item, index) => {
- return (
-
-
-
- {!!item
- .ImageTags
- .Primary && (
-
- )}
-
-
-
-
-
-
-
- {item.Name}
-
-
- ,
-
+ }
+ currentUser={user.data}
+ favourite={
+ item.UserData
+ ?.IsFavorite
+ }
+ >
+
+ );
+ })}
+
+ ) : (
+
+
+
+ {items.data.Items.map(
+ (item, index) => {
+ return (
+
- {item.Artists.map(
- (
- artist,
- aindex,
- ) => {
- return (
+
+
+ {!!item
+ .ImageTags
+ .Primary && (
+
+ )}
+
+
+
+
+
+
+
+ {
+ item.Name
+ }
+
+
- {
- artist
- }
+ ,
- );
- },
- )}
-
-
-
-
- {getRuntimeMusic(
- item.RunTimeTicks,
- )}
-
-
-
- {
- handleLiking(
- item,
- );
- }}
- >
- {item.UserData
- .IsFavorite ? (
-
- ) : (
-
- )}
-
-
-
- );
- })}
-
-
-
- )}
-
- {!items.isFetching &&
- !disablePaginationViews.includes(currentViewType) &&
- items.isSuccess &&
- items.data.TotalRecordCount > maxDisplayItems && (
-
-
- {maxDisplayItems * (page - 1)} -{" "}
- {items.data.TotalRecordCount <=
- maxDisplayItems * page
- ? items.data.TotalRecordCount
- : maxDisplayItems * page}{" "}
- of {items.data.TotalRecordCount}
-
- {
- setPage(val);
- }}
- count={Math.ceil(
- items.data.TotalRecordCount /
- maxDisplayItems,
- )}
- sx={{
- width: "fit-content",
- }}
- />
-
+ }
+ >
+ {item.Artists.map(
+ (
+ artist,
+ aindex,
+ ) => {
+ return (
+
+ {
+ artist
+ }
+
+ );
+ },
+ )}
+
+
+
+
+ {getRuntimeMusic(
+ item.RunTimeTicks,
+ )}
+
+
+
+ {
+ handleLiking(
+ item,
+ );
+ }}
+ >
+ {item
+ .UserData
+ .IsFavorite ? (
+
+ ) : (
+
+ )}
+
+
+
+ );
+ },
+ )}
+
+
+
)}
- {items.isError && }
+ {!items.isFetching &&
+ !disablePaginationViews.includes(
+ currentViewType,
+ ) &&
+ items.isSuccess &&
+ items.data.TotalRecordCount > maxDisplayItems && (
+
+
+ {maxDisplayItems * (page - 1)} -{" "}
+ {items.data.TotalRecordCount <=
+ maxDisplayItems * page
+ ? items.data.TotalRecordCount
+ : maxDisplayItems * page}{" "}
+ of {items.data.TotalRecordCount}
+
+ {
+ setPage(val);
+ }}
+ count={Math.ceil(
+ items.data.TotalRecordCount /
+ maxDisplayItems,
+ )}
+ sx={{
+ width: "fit-content",
+ }}
+ />
+
+ )}
+
+ {items.isError && }
+
);
diff --git a/src/styles/global.scss b/src/styles/global.scss
index f041c22..1336c5d 100644
--- a/src/styles/global.scss
+++ b/src/styles/global.scss
@@ -41,14 +41,18 @@ body {
overflow-y: overlay;
}
-#root,
+#root {
+ display: flex;
+ flex-direction: column;
+ height: 100vh;
+ width: 100vw;
+}
+
.root-page {
- height: fit-content;
- width: 100%;
- position: relative;
- overflow-y: hidden;
overflow-x: hidden;
- min-height: 100vh;
+ height: 100%;
+ margin-bottom: 12vh;
+ overflow-y: auto;
}
.centered {
@@ -96,13 +100,17 @@ h1 {
color: white !important;
}
+.scrollContainer {
+ position: relative;
+ flex-grow: 1;
+}
+
.scrollY {
overflow-x: hidden;
- overflow-y: visible;
- height: fit-content;
+ overflow-y: auto;
width: inherit;
box-sizing: border-box;
- min-height: 100vh;
+ padding: 1.5em;
}
.empty {
diff --git a/src/utils/store/backdrop.js b/src/utils/store/backdrop.js
new file mode 100644
index 0000000..84bb3ae
--- /dev/null
+++ b/src/utils/store/backdrop.js
@@ -0,0 +1,8 @@
+/** @format */
+
+import { create } from "zustand";
+
+export const useBackdropStore = create((set) => ({
+ hash: "LGJCbc|t1s1}1{JU|y,uAo=3,s$Q",
+ setHash: (ahash) => set((state) => ({ hash: ahash })),
+}));