style: update everything to biome conventions
This commit is contained in:
86 files changed
+277
-494
No files matched your search
@@ -9,6 +9,9 @@
|
|||||||
"recommended": true,
|
"recommended": true,
|
||||||
"style": {
|
"style": {
|
||||||
"noNonNullAssertion": "off"
|
"noNonNullAssertion": "off"
|
||||||
|
},
|
||||||
|
"a11y": {
|
||||||
|
"useKeyWithClickEvents": "off"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+2
-2
@@ -8,8 +8,8 @@
|
|||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"tauri": "tauri",
|
"tauri": "tauri",
|
||||||
"lint": "biome check src/",
|
"lint": "biome check src/**/*",
|
||||||
"lint:fix": "biome check --apply src/"
|
"lint:fix": "biome check --apply src/**/*"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/react": "^11.11.3",
|
"@emotion/react": "^11.11.3",
|
||||||
|
|||||||
@@ -330,6 +330,7 @@ export const AppBar = () => {
|
|||||||
"Primary",
|
"Primary",
|
||||||
) ? (
|
) ? (
|
||||||
<img
|
<img
|
||||||
|
alt={library.Name}
|
||||||
src={`${api.basePath}/Items/${library.Id}/Images/Primary?quality=90&fillHeight=226&fillWidth=127`}
|
src={`${api.basePath}/Items/${library.Id}/Images/Primary?quality=90&fillHeight=226&fillWidth=127`}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import AppBar from "@mui/material/AppBar";
|
import AppBar from "@mui/material/AppBar";
|
||||||
import IconButton from "@mui/material/IconButton";
|
import IconButton from "@mui/material/IconButton";
|
||||||
import Toolbar from "@mui/material/Toolbar";
|
import Toolbar from "@mui/material/Toolbar";
|
||||||
|
|||||||
@@ -199,6 +199,7 @@ const PlayButton = ({
|
|||||||
setItemName(
|
setItemName(
|
||||||
<div className="video-osd-name">
|
<div className="video-osd-name">
|
||||||
<img
|
<img
|
||||||
|
alt={item.Items[0].Name}
|
||||||
src={`${api.basePath}/Items/${item.Items[0].Id}/Images/Logo`}
|
src={`${api.basePath}/Items/${item.Items[0].Id}/Images/Logo`}
|
||||||
className="video-osd-name-logo"
|
className="video-osd-name-logo"
|
||||||
onLoad={(e) => {
|
onLoad={(e) => {
|
||||||
@@ -220,6 +221,7 @@ const PlayButton = ({
|
|||||||
setItemName(
|
setItemName(
|
||||||
<div className="video-osd-name">
|
<div className="video-osd-name">
|
||||||
<img
|
<img
|
||||||
|
alt={item.Items[0].SeriesName}
|
||||||
src={`${api.basePath}/Items/${item.Items[0].SeriesId}/Images/Logo`}
|
src={`${api.basePath}/Items/${item.Items[0].SeriesId}/Images/Logo`}
|
||||||
className="video-osd-name-logo"
|
className="video-osd-name-logo"
|
||||||
onLoad={(e) => {
|
onLoad={(e) => {
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ export const ActorCard = ({
|
|||||||
<div className="material-symbols-rounded">person</div>
|
<div className="material-symbols-rounded">person</div>
|
||||||
</div>
|
</div>
|
||||||
<img
|
<img
|
||||||
|
alt={item.Name}
|
||||||
src={api.getItemImageUrl(
|
src={api.getItemImageUrl(
|
||||||
seriesId ? item.SeriesId : item.Id,
|
seriesId ? item.SeriesId : item.Id,
|
||||||
"Primary",
|
"Primary",
|
||||||
@@ -87,7 +88,9 @@ export const ActorCard = ({
|
|||||||
opacity: 0,
|
opacity: 0,
|
||||||
}}
|
}}
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
onLoad={(e) => (e.target.style.opacity = 1)}
|
onLoad={(e) => {
|
||||||
|
e.target.style.opacity = 1;
|
||||||
|
}}
|
||||||
className="card-image"
|
className="card-image"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -130,6 +130,7 @@ export const Card = ({
|
|||||||
{overrideIcon ? getTypeIcon(overrideIcon) : getTypeIcon(item.Type)}
|
{overrideIcon ? getTypeIcon(overrideIcon) : getTypeIcon(item.Type)}
|
||||||
</div>
|
</div>
|
||||||
<img
|
<img
|
||||||
|
alt={item.Name}
|
||||||
src={
|
src={
|
||||||
overrideIcon === "User"
|
overrideIcon === "User"
|
||||||
? `${api.basePath}/Users/${item.Id}/Images/Primary`
|
? `${api.basePath}/Users/${item.Id}/Images/Primary`
|
||||||
@@ -155,7 +156,9 @@ export const Card = ({
|
|||||||
opacity: 0,
|
opacity: 0,
|
||||||
}}
|
}}
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
onLoad={(e) => (e.target.style.opacity = 1)}
|
onLoad={(e) => {
|
||||||
|
e.target.style.opacity = 1;
|
||||||
|
}}
|
||||||
className="card-image"
|
className="card-image"
|
||||||
/>
|
/>
|
||||||
<div className="card-overlay">
|
<div className="card-overlay">
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ export const EpisodeCard = ({
|
|||||||
<div className="material-symbols-rounded">tv_gen</div>
|
<div className="material-symbols-rounded">tv_gen</div>
|
||||||
</div>
|
</div>
|
||||||
<img
|
<img
|
||||||
|
alt={item.Name}
|
||||||
src={api.getItemImageUrl(item.Id, "Primary", {
|
src={api.getItemImageUrl(item.Id, "Primary", {
|
||||||
quality: 90,
|
quality: 90,
|
||||||
fillHeight: 512,
|
fillHeight: 512,
|
||||||
@@ -97,7 +98,9 @@ export const EpisodeCard = ({
|
|||||||
opacity: 0,
|
opacity: 0,
|
||||||
}}
|
}}
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
onLoad={(e) => (e.target.style.opacity = 1)}
|
onLoad={(e) => {
|
||||||
|
e.target.style.opacity = 1;
|
||||||
|
}}
|
||||||
className="card-image"
|
className="card-image"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ const Carousel = ({ content, onChange }) => {
|
|||||||
state.setDirection,
|
state.setDirection,
|
||||||
state.direction,
|
state.direction,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
// biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
onChange(currentSlide);
|
onChange(currentSlide);
|
||||||
}, [content[currentSlide].key]);
|
}, [content[currentSlide].key]);
|
||||||
@@ -106,7 +108,7 @@ const Carousel = ({ content, onChange }) => {
|
|||||||
? "carousel-indicator active"
|
? "carousel-indicator active"
|
||||||
: "carousel-indicator"
|
: "carousel-indicator"
|
||||||
}
|
}
|
||||||
key={index}
|
key={item.Id}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (currentSlide > index) {
|
if (currentSlide > index) {
|
||||||
setDirection("left");
|
setDirection("left");
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ const CarouselSlide = ({ item }) => {
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<img
|
<img
|
||||||
|
alt={item.Name}
|
||||||
className="hero-carousel-background-image"
|
className="hero-carousel-background-image"
|
||||||
src={
|
src={
|
||||||
item.ParentBackdropItemId
|
item.ParentBackdropItemId
|
||||||
@@ -109,7 +110,9 @@ const CarouselSlide = ({ item }) => {
|
|||||||
style={{
|
style={{
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
}}
|
}}
|
||||||
onLoad={(e) => (e.target.style.opacity = 1)}
|
onLoad={(e) => {
|
||||||
|
e.target.style.opacity = 1;
|
||||||
|
}}
|
||||||
loading="eager"
|
loading="eager"
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
@@ -156,6 +159,7 @@ const CarouselSlide = ({ item }) => {
|
|||||||
item.Name
|
item.Name
|
||||||
) : (
|
) : (
|
||||||
<img
|
<img
|
||||||
|
alt={item.Name}
|
||||||
className="hero-carousel-text-logo"
|
className="hero-carousel-text-logo"
|
||||||
src={`${api.basePath}/Items/${item.Id}/Images/Logo?quality=90&tag=${item.ImageTags.Logo}`}
|
src={`${api.basePath}/Items/${item.Id}/Images/Logo?quality=90&tag=${item.ImageTags.Logo}`}
|
||||||
style={{
|
style={{
|
||||||
@@ -163,7 +167,9 @@ const CarouselSlide = ({ item }) => {
|
|||||||
transition: "opacity 0.2s",
|
transition: "opacity 0.2s",
|
||||||
objectFit: "contain",
|
objectFit: "contain",
|
||||||
}}
|
}}
|
||||||
onLoad={(e) => (e.target.style.opacity = 1)}
|
onLoad={(e) => {
|
||||||
|
e.target.style.opacity = 1;
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
import { MdiChevronLeft } from "./mdiChevronLeft";
|
import { MdiChevronLeft } from "./mdiChevronLeft";
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiArrowLeft } from "@mdi/js";
|
import { mdiArrowLeft } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiBook } from "@mdi/js";
|
import { mdiBook } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiBookMultiple } from "@mdi/js";
|
import { mdiBookMultiple } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiCheck } from "@mdi/js";
|
import { mdiCheck } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiChevronDown } from "@mdi/js";
|
import { mdiChevronDown } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiChevronRight } from "@mdi/js";
|
import { mdiChevronRight } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
import { MdiChevronLeft } from "./mdiChevronLeft";
|
import { MdiChevronLeft } from "./mdiChevronLeft";
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiCogSync } from "@mdi/js";
|
import { mdiCogSync } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiEyeOffOutline } from "@mdi/js";
|
import { mdiEyeOffOutline } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiEyeOutline } from "@mdi/js";
|
import { mdiEyeOutline } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiFilmstrip } from "@mdi/js";
|
import { mdiFilmstrip } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiFilmstripBoxMultiple } from "@mdi/js";
|
import { mdiFilmstripBoxMultiple } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiFilterOutline } from "@mdi/js";
|
import { mdiFilterOutline } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiFolderMultiple } from "@mdi/js";
|
import { mdiFolderMultiple } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiFolderMusicOutline } from "@mdi/js";
|
import { mdiFolderMusicOutline } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiFolderOutline } from "@mdi/js";
|
import { mdiFolderOutline } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiFullscreen } from "@mdi/js";
|
import { mdiFullscreen } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiFullscreenExit } from "@mdi/js";
|
import { mdiFullscreenExit } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiHdr } from "@mdi/js";
|
import { mdiHdr } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiHeart } from "@mdi/js";
|
import { mdiHeart } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiHeartOutline } from "@mdi/js";
|
import { mdiHeartOutline } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiHomeVariant } from "@mdi/js";
|
import { mdiHomeVariant } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiHomeVariantOutline } from "@mdi/js";
|
import { mdiHomeVariantOutline } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiImage } from "@mdi/js";
|
import { mdiImage } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiImageMultiple } from "@mdi/js";
|
import { mdiImageMultiple } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiInformation } from "@mdi/js";
|
import { mdiInformation } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiMicrophone } from "@mdi/js";
|
import { mdiMicrophone } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiMovieOutline } from "@mdi/js";
|
import { mdiMovieOutline } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiMultimedia } from "@mdi/js";
|
import { mdiMultimedia } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiMusicBoxMultipleOutline } from "@mdi/js";
|
import { mdiMusicBoxMultipleOutline } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiPlaySpeed } from "@mdi/js";
|
import { mdiPlaySpeed } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiPlaylistMusicOutline } from "@mdi/js";
|
import { mdiPlaylistMusicOutline } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiStar } from "@mdi/js";
|
import { mdiStar } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiStarHalfFull } from "@mdi/js";
|
import { mdiStarHalfFull } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiTelevision } from "@mdi/js";
|
import { mdiTelevision } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiTelevisionClassic } from "@mdi/js";
|
import { mdiTelevisionClassic } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiVolumeHigh } from "@mdi/js";
|
import { mdiVolumeHigh } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiVolumeOff } from "@mdi/js";
|
import { mdiVolumeOff } from "@mdi/js";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import SvgIcon from "@mui/material/SvgIcon";
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
import { mdiYoutube } from "@mdi/js";
|
import { mdiYoutube } from "@mdi/js";
|
||||||
|
|||||||
@@ -111,7 +111,8 @@ const Hero = ({
|
|||||||
videoTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("4k")
|
videoTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("4k")
|
||||||
) {
|
) {
|
||||||
return "4K";
|
return "4K";
|
||||||
}if (
|
}
|
||||||
|
if (
|
||||||
videoTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("1080p") ||
|
videoTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("1080p") ||
|
||||||
videoTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("hd")
|
videoTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("hd")
|
||||||
) {
|
) {
|
||||||
@@ -126,13 +127,11 @@ const Hero = ({
|
|||||||
audioTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("truehd")
|
audioTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("truehd")
|
||||||
) {
|
) {
|
||||||
return "TrueHD | Atmos";
|
return "TrueHD | Atmos";
|
||||||
}if (
|
}
|
||||||
audioTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("atmos")
|
if (audioTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("atmos")) {
|
||||||
) {
|
|
||||||
return "Atmos";
|
return "Atmos";
|
||||||
}if (
|
}
|
||||||
audioTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("truehd")
|
if (audioTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("truehd")) {
|
||||||
) {
|
|
||||||
return "TrueHD";
|
return "TrueHD";
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
@@ -141,7 +140,8 @@ const Hero = ({
|
|||||||
const surroundSoundLabel = () => {
|
const surroundSoundLabel = () => {
|
||||||
if (audioTracks[0]?.DisplayTitle.includes("7.1")) {
|
if (audioTracks[0]?.DisplayTitle.includes("7.1")) {
|
||||||
return "7.1";
|
return "7.1";
|
||||||
}if (audioTracks[0].DisplayTitle.includes("5.1")) {
|
}
|
||||||
|
if (audioTracks[0].DisplayTitle.includes("5.1")) {
|
||||||
return "5.1";
|
return "5.1";
|
||||||
}
|
}
|
||||||
return "2.0";
|
return "2.0";
|
||||||
@@ -182,7 +182,9 @@ const Hero = ({
|
|||||||
style={{
|
style={{
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
}}
|
}}
|
||||||
onLoad={(e) => (e.target.style.opacity = 1)}
|
onLoad={(e) => {
|
||||||
|
e.target.style.opacity = 1;
|
||||||
|
}}
|
||||||
loading="eager"
|
loading="eager"
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ export const SideMenu = () => {
|
|||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<img src={Icon} className="sidemenu-icon" />
|
<img alt="JellyPlayer" src={Icon} className="sidemenu-icon" />
|
||||||
</DrawerHeader>
|
</DrawerHeader>
|
||||||
<div className="sidemenu-item-container">
|
<div className="sidemenu-item-container">
|
||||||
{libraries.isPending ? (
|
{libraries.isPending ? (
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ const MusicTrack = ({
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<img
|
<img
|
||||||
|
alt={item.Name}
|
||||||
src={api.getItemImageUrl(
|
src={api.getItemImageUrl(
|
||||||
Object.keys(item.ImageTags).length === 0 ? item.AlbumId : item.Id,
|
Object.keys(item.ImageTags).length === 0 ? item.AlbumId : item.Id,
|
||||||
"Primary",
|
"Primary",
|
||||||
@@ -64,7 +65,9 @@ const MusicTrack = ({
|
|||||||
objectFit: "cover",
|
objectFit: "cover",
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
}}
|
}}
|
||||||
onLoad={(e) => (e.target.style.opacity = 1)}
|
onLoad={(e) => {
|
||||||
|
e.target.style.opacity = 1;
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
<div className="music-track-image-overlay">
|
<div className="music-track-image-overlay">
|
||||||
<PlayButton
|
<PlayButton
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import Box from "@mui/material/Box";
|
import Box from "@mui/material/Box";
|
||||||
import Card from "@mui/material/Card";
|
import Card from "@mui/material/Card";
|
||||||
import CardActionArea from "@mui/material/CardActionArea";
|
import CardActionArea from "@mui/material/CardActionArea";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import Card from "@mui/material/Card";
|
import Card from "@mui/material/Card";
|
||||||
import CardContent from "@mui/material/CardContent";
|
import CardContent from "@mui/material/CardContent";
|
||||||
import CardMedia from "@mui/material/CardMedia";
|
import CardMedia from "@mui/material/CardMedia";
|
||||||
@@ -19,9 +18,9 @@ export const EpisodeCardsSkeleton = () => {
|
|||||||
}}
|
}}
|
||||||
sx={{ width: "100%" }}
|
sx={{ width: "100%" }}
|
||||||
>
|
>
|
||||||
{Array.from(new Array(4)).map((a, index) => {
|
{Array.from(new Array(4)).map((a) => {
|
||||||
return (
|
return (
|
||||||
<Grid xs={1} sm={1} md={1} key={index}>
|
<Grid xs={1} sm={1} md={1} key={a}>
|
||||||
<Card sx={{ background: "transparent" }} elevation={0}>
|
<Card sx={{ background: "transparent" }} elevation={0}>
|
||||||
<CardMedia>
|
<CardMedia>
|
||||||
<Skeleton
|
<Skeleton
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import Card from "@mui/material/Card";
|
import Card from "@mui/material/Card";
|
||||||
import CardContent from "@mui/material/CardContent";
|
import CardContent from "@mui/material/CardContent";
|
||||||
import CardMedia from "@mui/material/CardMedia";
|
import CardMedia from "@mui/material/CardMedia";
|
||||||
@@ -50,7 +49,7 @@ export const SeasonSelectorSkeleton = () => {
|
|||||||
/>
|
/>
|
||||||
{Array.from(new Array(4)).map((a, index) => {
|
{Array.from(new Array(4)).map((a, index) => {
|
||||||
return (
|
return (
|
||||||
<Grid xs={1} sm={1} md={1} key={index}>
|
<Grid xs={1} sm={1} md={1} key={a}>
|
||||||
<Card sx={{ background: "transparent" }} elevation={0}>
|
<Card sx={{ background: "transparent" }} elevation={0}>
|
||||||
<CardMedia>
|
<CardMedia>
|
||||||
<Skeleton
|
<Skeleton
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ const About = () => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setBackdrop("", "");
|
setBackdrop("", "");
|
||||||
}, []);
|
});
|
||||||
if (systemInfo.isPending) {
|
if (systemInfo.isPending) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
@@ -69,7 +69,7 @@ const About = () => {
|
|||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
>
|
>
|
||||||
<img width="100%" height="100%" src={logo} />
|
<img alt="JellyPlayer" width="100%" height="100%" src={logo} />
|
||||||
</a>
|
</a>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ const MusicAlbumTitlePage = () => {
|
|||||||
item.data.Id,
|
item.data.Id,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}, [item.isSuccess]);
|
});
|
||||||
|
|
||||||
if (item.isPending || similarItems.isPending) {
|
if (item.isPending || similarItems.isPending) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -158,11 +158,7 @@ const ArtistTitlePage = () => {
|
|||||||
setActiveArtistTab(2);
|
setActiveArtistTab(2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [
|
});
|
||||||
artistDiscography.isPending,
|
|
||||||
artistSongs.isPending,
|
|
||||||
artistAppearances.isPending,
|
|
||||||
]);
|
|
||||||
|
|
||||||
const [animationDirection, setAnimationDirection] = useState("forward");
|
const [animationDirection, setAnimationDirection] = useState("forward");
|
||||||
|
|
||||||
@@ -178,7 +174,7 @@ const ArtistTitlePage = () => {
|
|||||||
item.data.Id,
|
item.data.Id,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}, [item.isSuccess]);
|
});
|
||||||
|
|
||||||
if (item.isPending) {
|
if (item.isPending) {
|
||||||
return (
|
return (
|
||||||
@@ -243,7 +239,7 @@ const ArtistTitlePage = () => {
|
|||||||
{artistTabs.map((tab, index) => {
|
{artistTabs.map((tab, index) => {
|
||||||
return (
|
return (
|
||||||
<Tab
|
<Tab
|
||||||
key={index}
|
key={tab.title}
|
||||||
label={tab.title}
|
label={tab.title}
|
||||||
disabled={tab.data.data?.TotalRecordCount === 0}
|
disabled={tab.data.data?.TotalRecordCount === 0}
|
||||||
/>
|
/>
|
||||||
@@ -273,10 +269,10 @@ const ArtistTitlePage = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{artistDiscography.isSuccess &&
|
{artistDiscography.isSuccess &&
|
||||||
artistDiscography.data.Items.map((tabitem, aindex) => {
|
artistDiscography.data.Items.map((tabitem) => {
|
||||||
return (
|
return (
|
||||||
<ArtistAlbum
|
<ArtistAlbum
|
||||||
key={aindex}
|
key={tabitem.Id}
|
||||||
user={user.data}
|
user={user.data}
|
||||||
album={tabitem}
|
album={tabitem}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -113,6 +113,7 @@ const BoxSetTitlePage = () => {
|
|||||||
|
|
||||||
const [directors, setDirectors] = useState([]);
|
const [directors, setDirectors] = useState([]);
|
||||||
const [writers, setWriters] = useState([]);
|
const [writers, setWriters] = useState([]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (item.isSuccess) {
|
if (item.isSuccess) {
|
||||||
setAppBackdrop(
|
setAppBackdrop(
|
||||||
@@ -127,7 +128,7 @@ const BoxSetTitlePage = () => {
|
|||||||
const writeTp = item.data.People.filter((itm) => itm.Type === "Writer");
|
const writeTp = item.data.People.filter((itm) => itm.Type === "Writer");
|
||||||
setWriters(writeTp);
|
setWriters(writeTp);
|
||||||
}
|
}
|
||||||
}, [item.isSuccess]);
|
});
|
||||||
|
|
||||||
if (item.isPending || similarItems.isPending) {
|
if (item.isPending || similarItems.isPending) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
+129
-294
@@ -1,21 +1,20 @@
|
|||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import React, { useState, useLayoutEffect } from "react";
|
import React, { useState, useLayoutEffect } from "react";
|
||||||
import PropTypes from "prop-types";
|
|
||||||
|
|
||||||
import Box from "@mui/material/Box";
|
import Box from "@mui/material/Box";
|
||||||
import Stack from "@mui/material/Stack";
|
|
||||||
import Typography from "@mui/material/Typography";
|
|
||||||
import CircularProgress from "@mui/material/CircularProgress";
|
|
||||||
import Chip from "@mui/material/Chip";
|
import Chip from "@mui/material/Chip";
|
||||||
import TextField from "@mui/material/TextField";
|
import CircularProgress from "@mui/material/CircularProgress";
|
||||||
import MenuItem from "@mui/material/MenuItem";
|
|
||||||
import Divider from "@mui/material/Divider";
|
import Divider from "@mui/material/Divider";
|
||||||
import LinearProgress from "@mui/material/LinearProgress";
|
import LinearProgress from "@mui/material/LinearProgress";
|
||||||
import { red, green, yellow } from "@mui/material/colors";
|
import MenuItem from "@mui/material/MenuItem";
|
||||||
|
import Stack from "@mui/material/Stack";
|
||||||
|
import TextField from "@mui/material/TextField";
|
||||||
|
import Typography from "@mui/material/Typography";
|
||||||
|
import { green, red, yellow } from "@mui/material/colors";
|
||||||
|
|
||||||
import { Blurhash } from "react-blurhash";
|
import { Blurhash } from "react-blurhash";
|
||||||
|
|
||||||
import { useParams, Link, NavLink } from "react-router-dom";
|
import { Link, NavLink, useParams } from "react-router-dom";
|
||||||
|
|
||||||
import { motion } from "framer-motion";
|
import { motion } from "framer-motion";
|
||||||
|
|
||||||
@@ -34,16 +33,16 @@ import { Card } from "../../components/card/card";
|
|||||||
import { CardScroller } from "../../components/cardScroller/cardScroller";
|
import { CardScroller } from "../../components/cardScroller/cardScroller";
|
||||||
import Hero from "../../components/layouts/item/hero";
|
import Hero from "../../components/layouts/item/hero";
|
||||||
|
|
||||||
import "./episode.module.scss";
|
|
||||||
import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
|
||||||
import { useBackdropStore } from "../../utils/store/backdrop";
|
|
||||||
import { useApi } from "../../utils/store/api";
|
|
||||||
import { endsAt, getRuntime } from "../../utils/date/time";
|
|
||||||
import PlayButton from "../../components/buttons/playButton";
|
|
||||||
import LikeButton from "../../components/buttons/likeButton";
|
import LikeButton from "../../components/buttons/likeButton";
|
||||||
import MarkPlayedButton from "../../components/buttons/markPlayedButton";
|
import MarkPlayedButton from "../../components/buttons/markPlayedButton";
|
||||||
|
import PlayButton from "../../components/buttons/playButton";
|
||||||
|
import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
||||||
import TextLink from "../../components/textLink";
|
import TextLink from "../../components/textLink";
|
||||||
import { getTypeIcon } from "../../components/utils/iconsCollection";
|
import { getTypeIcon } from "../../components/utils/iconsCollection";
|
||||||
|
import { endsAt, getRuntime } from "../../utils/date/time";
|
||||||
|
import { useApi } from "../../utils/store/api";
|
||||||
|
import { useBackdropStore } from "../../utils/store/backdrop";
|
||||||
|
import "./episode.module.scss";
|
||||||
|
|
||||||
function TabPanel(props) {
|
function TabPanel(props) {
|
||||||
const { children, value, index, ...other } = props;
|
const { children, value, index, ...other } = props;
|
||||||
@@ -107,7 +106,7 @@ const EpisodeTitlePage = () => {
|
|||||||
});
|
});
|
||||||
return result.data;
|
return result.data;
|
||||||
},
|
},
|
||||||
enabled: item.isSuccess && item.data.Type == BaseItemKind.Episode,
|
enabled: item.isSuccess && item.data.Type === BaseItemKind.Episode,
|
||||||
networkMode: "always",
|
networkMode: "always",
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -154,12 +153,13 @@ const EpisodeTitlePage = () => {
|
|||||||
setAudioTracks(audios);
|
setAudioTracks(audios);
|
||||||
setSubtitleTracks(subs);
|
setSubtitleTracks(subs);
|
||||||
}
|
}
|
||||||
}, [item.isSuccess]);
|
});
|
||||||
|
|
||||||
const [directors, setDirectors] = useState([]);
|
const [directors, setDirectors] = useState([]);
|
||||||
const [writers, setWriters] = useState([]);
|
const [writers, setWriters] = useState([]);
|
||||||
const [actors, setActors] = useState([]);
|
const [actors, setActors] = useState([]);
|
||||||
const [producers, setProducers] = useState([]);
|
const [producers, setProducers] = useState([]);
|
||||||
|
|
||||||
useLayoutEffect(() => {
|
useLayoutEffect(() => {
|
||||||
if (item.isSuccess) {
|
if (item.isSuccess) {
|
||||||
setAppBackdrop(
|
setAppBackdrop(
|
||||||
@@ -173,72 +173,57 @@ const EpisodeTitlePage = () => {
|
|||||||
setDirectors(direTp);
|
setDirectors(direTp);
|
||||||
const writeTp = item.data.People.filter((itm) => itm.Type === "Writer");
|
const writeTp = item.data.People.filter((itm) => itm.Type === "Writer");
|
||||||
setWriters(writeTp);
|
setWriters(writeTp);
|
||||||
let producerTp = item.data.People.filter(
|
const producerTp = item.data.People.filter(
|
||||||
(itm) => itm.Type == "Producer",
|
(itm) => itm.Type === "Producer",
|
||||||
);
|
);
|
||||||
setProducers(producerTp);
|
setProducers(producerTp);
|
||||||
let actorTp = item.data.People.filter(
|
const actorTp = item.data.People.filter((itm) => itm.Type === "Actor");
|
||||||
(itm) => itm.Type == "Actor",
|
|
||||||
);
|
|
||||||
setActors(actorTp);
|
setActors(actorTp);
|
||||||
}
|
}
|
||||||
}, [item.isSuccess]);
|
});
|
||||||
|
|
||||||
const qualityLabel = () => {
|
const qualityLabel = () => {
|
||||||
if (
|
if (
|
||||||
videoTracks[0]?.DisplayTitle.toLocaleLowerCase().includes(
|
videoTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("2160p") ||
|
||||||
"2160p",
|
|
||||||
) ||
|
|
||||||
videoTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("4k")
|
videoTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("4k")
|
||||||
) {
|
) {
|
||||||
return <span className="material-symbols-rounded">4k</span>;
|
return <span className="material-symbols-rounded">4k</span>;
|
||||||
} else if (
|
}
|
||||||
videoTracks[0]?.DisplayTitle.toLocaleLowerCase().includes(
|
|
||||||
"1080p",
|
if (
|
||||||
) ||
|
videoTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("1080p") ||
|
||||||
videoTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("hd")
|
videoTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("hd")
|
||||||
) {
|
) {
|
||||||
return <span className="material-symbols-rounded">full_hd</span>;
|
return <span className="material-symbols-rounded">full_hd</span>;
|
||||||
} else {
|
|
||||||
return <span className="material-symbols-rounded">hd</span>;
|
|
||||||
}
|
}
|
||||||
|
return <span className="material-symbols-rounded">hd</span>;
|
||||||
};
|
};
|
||||||
|
|
||||||
const atmosLabel = () => {
|
const atmosLabel = () => {
|
||||||
if (
|
if (
|
||||||
audioTracks[0]?.DisplayTitle.toLocaleLowerCase().includes(
|
audioTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("atmos") &&
|
||||||
"atmos",
|
audioTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("truehd")
|
||||||
) &&
|
|
||||||
audioTracks[0]?.DisplayTitle.toLocaleLowerCase().includes(
|
|
||||||
"truehd",
|
|
||||||
)
|
|
||||||
) {
|
) {
|
||||||
return `TrueHD | Atmos`;
|
return "TrueHD | Atmos";
|
||||||
} else if (
|
|
||||||
audioTracks[0]?.DisplayTitle.toLocaleLowerCase().includes(
|
|
||||||
"atmos",
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
return "Atmos";
|
|
||||||
} else if (
|
|
||||||
audioTracks[0]?.DisplayTitle.toLocaleLowerCase().includes(
|
|
||||||
"truehd",
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
return "TrueHD";
|
|
||||||
} else {
|
|
||||||
return "";
|
|
||||||
}
|
}
|
||||||
|
if (audioTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("atmos")) {
|
||||||
|
return "Atmos";
|
||||||
|
}
|
||||||
|
if (audioTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("truehd")) {
|
||||||
|
return "TrueHD";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
};
|
};
|
||||||
|
|
||||||
const surroundSoundLabel = () => {
|
const surroundSoundLabel = () => {
|
||||||
if (audioTracks[0]?.DisplayTitle.includes("7.1")) {
|
if (audioTracks[0]?.DisplayTitle.includes("7.1")) {
|
||||||
return "7.1";
|
return "7.1";
|
||||||
} else if (audioTracks[0]?.DisplayTitle.includes("5.1")) {
|
|
||||||
return "5.1";
|
|
||||||
} else {
|
|
||||||
return "2.0";
|
|
||||||
}
|
}
|
||||||
|
if (audioTracks[0]?.DisplayTitle.includes("5.1")) {
|
||||||
|
return "5.1";
|
||||||
|
}
|
||||||
|
|
||||||
|
return "2.0";
|
||||||
};
|
};
|
||||||
|
|
||||||
if (item.isPending) {
|
if (item.isPending) {
|
||||||
@@ -276,18 +261,18 @@ const EpisodeTitlePage = () => {
|
|||||||
<div className="item-hero-backdrop-container">
|
<div className="item-hero-backdrop-container">
|
||||||
{item.data.BackdropImageTags ? (
|
{item.data.BackdropImageTags ? (
|
||||||
<img
|
<img
|
||||||
|
alt={item.data.Name}
|
||||||
src={api.getItemImageUrl(
|
src={api.getItemImageUrl(
|
||||||
item.data.ParentBackdropItemId,
|
item.data.ParentBackdropItemId,
|
||||||
"Backdrop",
|
"Backdrop",
|
||||||
{
|
{
|
||||||
tag: item.data
|
tag: item.data.ParentBackdropImageTags[0],
|
||||||
.ParentBackdropImageTags[0],
|
|
||||||
},
|
},
|
||||||
)}
|
)}
|
||||||
className="item-hero-backdrop"
|
className="item-hero-backdrop"
|
||||||
onLoad={(e) =>
|
onLoad={(e) => {
|
||||||
(e.currentTarget.style.opacity = 1)
|
e.currentTarget.style.opacity = 1;
|
||||||
}
|
}}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<></>
|
<></>
|
||||||
@@ -296,39 +281,28 @@ const EpisodeTitlePage = () => {
|
|||||||
<div
|
<div
|
||||||
className="item-hero-image-container"
|
className="item-hero-image-container"
|
||||||
style={{
|
style={{
|
||||||
aspectRatio:
|
aspectRatio: item.data.PrimaryImageAspectRatio ?? 1,
|
||||||
item.data.PrimaryImageAspectRatio ?? 1,
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{Object.keys(item.data.ImageTags).includes(
|
{Object.keys(item.data.ImageTags).includes("Primary") ? (
|
||||||
"Primary",
|
|
||||||
) ? (
|
|
||||||
<>
|
<>
|
||||||
<Blurhash
|
<Blurhash
|
||||||
hash={
|
hash={
|
||||||
item.data.ImageBlurHashes
|
item.data.ImageBlurHashes.Primary[
|
||||||
.Primary[
|
item.data.ImageTags.Primary
|
||||||
item.data.ImageTags[
|
|
||||||
"Primary"
|
|
||||||
]
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
className="item-hero-image-blurhash"
|
className="item-hero-image-blurhash"
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
src={api.getItemImageUrl(
|
alt={item.data.Name}
|
||||||
item.data.Id,
|
src={api.getItemImageUrl(item.data.Id, "Primary", {
|
||||||
"Primary",
|
|
||||||
{
|
|
||||||
quality: 90,
|
quality: 90,
|
||||||
tag: item.data.ImageTags[
|
tag: item.data.ImageTags.Primary,
|
||||||
"Primary"
|
})}
|
||||||
],
|
onLoad={(e) => {
|
||||||
},
|
e.currentTarget.style.opacity = 1;
|
||||||
)}
|
}}
|
||||||
onLoad={(e) =>
|
|
||||||
(e.currentTarget.style.opacity = 1)
|
|
||||||
}
|
|
||||||
className="item-hero-image"
|
className="item-hero-image"
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
@@ -337,24 +311,18 @@ const EpisodeTitlePage = () => {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="item-hero-detail flex flex-column">
|
<div className="item-hero-detail flex flex-column">
|
||||||
<TextLink
|
<TextLink variant={"h3"} location={`/series/${item.data.SeriesId}`}>
|
||||||
variant={"h3"}
|
|
||||||
location={`/series/${item.data.SeriesId}`}
|
|
||||||
>
|
|
||||||
{item.data.ParentLogoItemId.length > 0 ? (
|
{item.data.ParentLogoItemId.length > 0 ? (
|
||||||
<img
|
<img
|
||||||
src={api.getItemImageUrl(
|
alt={item.data.SeriesName}
|
||||||
item.data.ParentLogoItemId,
|
src={api.getItemImageUrl(item.data.ParentLogoItemId, "Logo", {
|
||||||
"Logo",
|
|
||||||
{
|
|
||||||
quality: 90,
|
quality: 90,
|
||||||
fillWidth: 592,
|
fillWidth: 592,
|
||||||
fillHeight: 592,
|
fillHeight: 592,
|
||||||
},
|
})}
|
||||||
)}
|
onLoad={(e) => {
|
||||||
onLoad={(e) =>
|
e.currentTarget.style.opacity = 1;
|
||||||
(e.currentTarget.style.opacity = 1)
|
}}
|
||||||
}
|
|
||||||
className="item-hero-logo"
|
className="item-hero-logo"
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
@@ -372,8 +340,7 @@ const EpisodeTitlePage = () => {
|
|||||||
variant="filled"
|
variant="filled"
|
||||||
label={qualityLabel()}
|
label={qualityLabel()}
|
||||||
sx={{
|
sx={{
|
||||||
borderRadius:
|
borderRadius: "8px !important",
|
||||||
"8px !important",
|
|
||||||
"& .MuiChip-label": {
|
"& .MuiChip-label": {
|
||||||
fontSize: "2.2em",
|
fontSize: "2.2em",
|
||||||
},
|
},
|
||||||
@@ -384,16 +351,12 @@ const EpisodeTitlePage = () => {
|
|||||||
<Chip
|
<Chip
|
||||||
variant="filled"
|
variant="filled"
|
||||||
label={
|
label={
|
||||||
<Typography
|
<Typography variant="caption" fontWeight={600}>
|
||||||
variant="caption"
|
|
||||||
fontWeight={600}
|
|
||||||
>
|
|
||||||
{surroundSoundLabel()}
|
{surroundSoundLabel()}
|
||||||
</Typography>
|
</Typography>
|
||||||
}
|
}
|
||||||
sx={{
|
sx={{
|
||||||
borderRadius:
|
borderRadius: "8px !important",
|
||||||
"8px !important",
|
|
||||||
"& .MuiChip-label": {
|
"& .MuiChip-label": {
|
||||||
fontSize: "2.2em",
|
fontSize: "2.2em",
|
||||||
},
|
},
|
||||||
@@ -404,19 +367,12 @@ const EpisodeTitlePage = () => {
|
|||||||
<Chip
|
<Chip
|
||||||
variant="filled"
|
variant="filled"
|
||||||
label={
|
label={
|
||||||
<Typography
|
<Typography variant="caption" fontWeight={600}>
|
||||||
variant="caption"
|
{videoTracks[0].VideoRangeType}
|
||||||
fontWeight={600}
|
|
||||||
>
|
|
||||||
{
|
|
||||||
videoTracks[0]
|
|
||||||
.VideoRangeType
|
|
||||||
}
|
|
||||||
</Typography>
|
</Typography>
|
||||||
}
|
}
|
||||||
sx={{
|
sx={{
|
||||||
borderRadius:
|
borderRadius: "8px !important",
|
||||||
"8px !important",
|
|
||||||
"& .MuiChip-label": {
|
"& .MuiChip-label": {
|
||||||
fontSize: "2.2em",
|
fontSize: "2.2em",
|
||||||
},
|
},
|
||||||
@@ -427,16 +383,12 @@ const EpisodeTitlePage = () => {
|
|||||||
<Chip
|
<Chip
|
||||||
variant="filled"
|
variant="filled"
|
||||||
label={
|
label={
|
||||||
<Typography
|
<Typography variant="caption" fontWeight={600}>
|
||||||
variant="caption"
|
|
||||||
fontWeight={600}
|
|
||||||
>
|
|
||||||
{atmosLabel()}
|
{atmosLabel()}
|
||||||
</Typography>
|
</Typography>
|
||||||
}
|
}
|
||||||
sx={{
|
sx={{
|
||||||
borderRadius:
|
borderRadius: "8px !important",
|
||||||
"8px !important",
|
|
||||||
"& .MuiChip-label": {
|
"& .MuiChip-label": {
|
||||||
fontSize: "2.2em",
|
fontSize: "2.2em",
|
||||||
},
|
},
|
||||||
@@ -459,8 +411,7 @@ const EpisodeTitlePage = () => {
|
|||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
sx={{
|
sx={{
|
||||||
borderRadius:
|
borderRadius: "8px !important",
|
||||||
"8px !important",
|
|
||||||
"& .MuiChip-label": {
|
"& .MuiChip-label": {
|
||||||
fontSize: "2.2em",
|
fontSize: "2.2em",
|
||||||
},
|
},
|
||||||
@@ -474,17 +425,11 @@ const EpisodeTitlePage = () => {
|
|||||||
justifyItems="flex-start"
|
justifyItems="flex-start"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
>
|
>
|
||||||
<Typography
|
<Typography style={{ opacity: "0.8" }} variant="subtitle1">
|
||||||
style={{ opacity: "0.8" }}
|
|
||||||
variant="subtitle1"
|
|
||||||
>
|
|
||||||
{item.data.ProductionYear ?? ""}
|
{item.data.ProductionYear ?? ""}
|
||||||
</Typography>
|
</Typography>
|
||||||
{item.data.OfficialRating && (
|
{item.data.OfficialRating && (
|
||||||
<Chip
|
<Chip variant="filled" label={item.data.OfficialRating} />
|
||||||
variant="filled"
|
|
||||||
label={item.data.OfficialRating}
|
|
||||||
/>
|
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{item.data.CommunityRating && (
|
{item.data.CommunityRating && (
|
||||||
@@ -513,11 +458,7 @@ const EpisodeTitlePage = () => {
|
|||||||
}}
|
}}
|
||||||
variant="subtitle1"
|
variant="subtitle1"
|
||||||
>
|
>
|
||||||
{Math.round(
|
{Math.round(item.data.CommunityRating * 10) / 10}
|
||||||
item.data
|
|
||||||
.CommunityRating *
|
|
||||||
10,
|
|
||||||
) / 10}
|
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@@ -534,18 +475,12 @@ const EpisodeTitlePage = () => {
|
|||||||
className="material-symbols-rounded "
|
className="material-symbols-rounded "
|
||||||
style={{
|
style={{
|
||||||
color:
|
color:
|
||||||
item.data
|
item.data.CriticRating > 50 ? green[400] : red[400],
|
||||||
.CriticRating >
|
|
||||||
50
|
|
||||||
? green[400]
|
|
||||||
: red[400],
|
|
||||||
fontVariationSettings:
|
fontVariationSettings:
|
||||||
'"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40',
|
'"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{item.data.CriticRating > 50
|
{item.data.CriticRating > 50 ? "thumb_up" : "thumb_down"}
|
||||||
? "thumb_up"
|
|
||||||
: "thumb_down"}
|
|
||||||
</div>
|
</div>
|
||||||
<Typography
|
<Typography
|
||||||
style={{
|
style={{
|
||||||
@@ -559,32 +494,20 @@ const EpisodeTitlePage = () => {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{item.data.RunTimeTicks && (
|
{item.data.RunTimeTicks && (
|
||||||
<Typography
|
<Typography style={{ opacity: "0.8" }} variant="subtitle1">
|
||||||
style={{ opacity: "0.8" }}
|
{getRuntime(item.data.RunTimeTicks)}
|
||||||
variant="subtitle1"
|
|
||||||
>
|
|
||||||
{getRuntime(
|
|
||||||
item.data.RunTimeTicks,
|
|
||||||
)}
|
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
{item.data.RunTimeTicks && (
|
{item.data.RunTimeTicks && (
|
||||||
<Typography
|
<Typography style={{ opacity: "0.8" }} variant="subtitle1">
|
||||||
style={{ opacity: "0.8" }}
|
|
||||||
variant="subtitle1"
|
|
||||||
>
|
|
||||||
{endsAt(
|
{endsAt(
|
||||||
item.data.RunTimeTicks -
|
item.data.RunTimeTicks -
|
||||||
item.data.UserData
|
item.data.UserData.PlaybackPositionTicks,
|
||||||
.PlaybackPositionTicks,
|
|
||||||
)}
|
)}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
<Typography
|
<Typography variant="subtitle1" style={{ opacity: 0.8 }}>
|
||||||
variant="subtitle1"
|
|
||||||
style={{ opacity: 0.8 }}
|
|
||||||
>
|
|
||||||
{item.data.Genres.join(", ")}
|
{item.data.Genres.join(", ")}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
@@ -594,38 +517,25 @@ const EpisodeTitlePage = () => {
|
|||||||
itemId={item.data.Id}
|
itemId={item.data.Id}
|
||||||
itemType={item.data.Type}
|
itemType={item.data.Type}
|
||||||
itemUserData={item.data.UserData}
|
itemUserData={item.data.UserData}
|
||||||
currentVideoTrack={
|
currentVideoTrack={selectedVideoTrack}
|
||||||
selectedVideoTrack
|
currentAudioTrack={selectedAudioTrack}
|
||||||
}
|
currentSubTrack={selectedSubtitleTrack}
|
||||||
currentAudioTrack={
|
|
||||||
selectedAudioTrack
|
|
||||||
}
|
|
||||||
currentSubTrack={
|
|
||||||
selectedSubtitleTrack
|
|
||||||
}
|
|
||||||
userId={user.data.Id}
|
userId={user.data.Id}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div className="flex flex-row" style={{ gap: "1em" }}>
|
||||||
className="flex flex-row"
|
|
||||||
style={{ gap: "1em" }}
|
|
||||||
>
|
|
||||||
<LikeButton
|
<LikeButton
|
||||||
itemName={item.data.Name}
|
itemName={item.data.Name}
|
||||||
itemId={item.data.Id}
|
itemId={item.data.Id}
|
||||||
queryKey={["item", id]}
|
queryKey={["item", id]}
|
||||||
isFavorite={
|
isFavorite={item.data.UserData.IsFavorite}
|
||||||
item.data.UserData.IsFavorite
|
|
||||||
}
|
|
||||||
userId={user.data.Id}
|
userId={user.data.Id}
|
||||||
/>
|
/>
|
||||||
<MarkPlayedButton
|
<MarkPlayedButton
|
||||||
itemName={item.data.Name}
|
itemName={item.data.Name}
|
||||||
itemId={item.data.Id}
|
itemId={item.data.Id}
|
||||||
queryKey={["item", id]}
|
queryKey={["item", id]}
|
||||||
isPlayed={
|
isPlayed={item.data.UserData.Played}
|
||||||
item.data.UserData.Played
|
|
||||||
}
|
|
||||||
userId={user.data.Id}
|
userId={user.data.Id}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -644,29 +554,21 @@ const EpisodeTitlePage = () => {
|
|||||||
<Typography>
|
<Typography>
|
||||||
{getRuntime(
|
{getRuntime(
|
||||||
item.data.RunTimeTicks -
|
item.data.RunTimeTicks -
|
||||||
item.data.UserData
|
item.data.UserData.PlaybackPositionTicks,
|
||||||
.PlaybackPositionTicks,
|
|
||||||
)}{" "}
|
)}{" "}
|
||||||
left
|
left
|
||||||
</Typography>
|
</Typography>
|
||||||
<LinearProgress
|
<LinearProgress
|
||||||
color="white"
|
color="white"
|
||||||
variant="determinate"
|
variant="determinate"
|
||||||
value={
|
value={item.data.UserData.PlayedPercentage}
|
||||||
item.data.UserData
|
|
||||||
.PlayedPercentage
|
|
||||||
}
|
|
||||||
style={{
|
style={{
|
||||||
borderRadius: "10px",
|
borderRadius: "10px",
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<Typography
|
<Typography variant="h5" fontStyle="italic" mb={1}>
|
||||||
variant="h5"
|
|
||||||
fontStyle="italic"
|
|
||||||
mb={1}
|
|
||||||
>
|
|
||||||
{item.data.Taglines[0] ?? ""}
|
{item.data.Taglines[0] ?? ""}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="subtitle1">
|
<Typography variant="subtitle1">
|
||||||
@@ -688,20 +590,15 @@ const EpisodeTitlePage = () => {
|
|||||||
<>
|
<>
|
||||||
<TextLink
|
<TextLink
|
||||||
key={writer.Id}
|
key={writer.Id}
|
||||||
variant={
|
variant={"subtitle1"}
|
||||||
"subtitle1"
|
|
||||||
}
|
|
||||||
location={`/person/${writer.Id}`}
|
location={`/person/${writer.Id}`}
|
||||||
>
|
>
|
||||||
{writer.Name}
|
{writer.Name}
|
||||||
</TextLink>
|
</TextLink>
|
||||||
{index !=
|
{index !== writers.length - 1 && (
|
||||||
writers.length -
|
|
||||||
1 && (
|
|
||||||
<span
|
<span
|
||||||
style={{
|
style={{
|
||||||
whiteSpace:
|
whiteSpace: "pre",
|
||||||
"pre",
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
,{" "}
|
,{" "}
|
||||||
@@ -724,35 +621,26 @@ const EpisodeTitlePage = () => {
|
|||||||
Directed by
|
Directed by
|
||||||
</Typography>
|
</Typography>
|
||||||
<div className="hero-text-container">
|
<div className="hero-text-container">
|
||||||
{directors.map(
|
{directors.map((director, index) => (
|
||||||
(director, index) => (
|
|
||||||
<>
|
<>
|
||||||
<TextLink
|
<TextLink
|
||||||
key={
|
key={director.Id}
|
||||||
director.Id
|
variant={"subtitle1"}
|
||||||
}
|
|
||||||
variant={
|
|
||||||
"subtitle1"
|
|
||||||
}
|
|
||||||
location={`/person/${director.Id}`}
|
location={`/person/${director.Id}`}
|
||||||
>
|
>
|
||||||
{director.Name}
|
{director.Name}
|
||||||
</TextLink>
|
</TextLink>
|
||||||
{index !=
|
{index !== directors.length - 1 && (
|
||||||
directors.length -
|
|
||||||
1 && (
|
|
||||||
<span
|
<span
|
||||||
style={{
|
style={{
|
||||||
whiteSpace:
|
whiteSpace: "pre",
|
||||||
"pre",
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
,{" "}
|
,{" "}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
),
|
))}
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@@ -772,17 +660,10 @@ const EpisodeTitlePage = () => {
|
|||||||
marginBottom: "1em",
|
marginBottom: "1em",
|
||||||
}}
|
}}
|
||||||
value={selectedVideoTrack}
|
value={selectedVideoTrack}
|
||||||
onChange={(e) =>
|
onChange={(e) => setSelectedVideoTrack(e.target.value)}
|
||||||
setSelectedVideoTrack(
|
|
||||||
e.target.value,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
{videoTracks.map((track) => (
|
{videoTracks.map((track) => (
|
||||||
<MenuItem
|
<MenuItem key={track.Index} value={track.Index}>
|
||||||
key={track.Index}
|
|
||||||
value={track.Index}
|
|
||||||
>
|
|
||||||
{track.DisplayTitle}
|
{track.DisplayTitle}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
))}
|
))}
|
||||||
@@ -797,17 +678,10 @@ const EpisodeTitlePage = () => {
|
|||||||
marginBottom: "1em",
|
marginBottom: "1em",
|
||||||
}}
|
}}
|
||||||
value={selectedAudioTrack}
|
value={selectedAudioTrack}
|
||||||
onChange={(e) =>
|
onChange={(e) => setSelectedAudioTrack(e.target.value)}
|
||||||
setSelectedAudioTrack(
|
|
||||||
e.target.value,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
{audioTracks.map((track) => (
|
{audioTracks.map((track) => (
|
||||||
<MenuItem
|
<MenuItem key={track.Index} value={track.Index}>
|
||||||
key={track.Index}
|
|
||||||
value={track.Index}
|
|
||||||
>
|
|
||||||
{track.DisplayTitle}
|
{track.DisplayTitle}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
))}
|
))}
|
||||||
@@ -821,20 +695,13 @@ const EpisodeTitlePage = () => {
|
|||||||
width: "100%",
|
width: "100%",
|
||||||
}}
|
}}
|
||||||
value={selectedSubtitleTrack}
|
value={selectedSubtitleTrack}
|
||||||
onChange={(e) =>
|
onChange={(e) => setSelectedSubtitleTrack(e.target.value)}
|
||||||
setSelectedSubtitleTrack(
|
|
||||||
e.target.value,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
<MenuItem key={-1} value={-1}>
|
<MenuItem key={-1} value={-1}>
|
||||||
No Subtitle
|
No Subtitle
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
{subtitleTracks.map((track) => (
|
{subtitleTracks.map((track) => (
|
||||||
<MenuItem
|
<MenuItem key={track.Index} value={track.Index}>
|
||||||
key={track.Index}
|
|
||||||
value={track.Index}
|
|
||||||
>
|
|
||||||
{track.DisplayTitle}
|
{track.DisplayTitle}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
))}
|
))}
|
||||||
@@ -907,28 +774,21 @@ const EpisodeTitlePage = () => {
|
|||||||
>
|
>
|
||||||
{actor.PrimaryImageTag ? (
|
{actor.PrimaryImageTag ? (
|
||||||
<img
|
<img
|
||||||
src={api.getItemImageUrl(
|
alt={actor.Name}
|
||||||
actor.Id,
|
src={api.getItemImageUrl(actor.Id, "Primary", {
|
||||||
"Primary",
|
|
||||||
{
|
|
||||||
quality: 80,
|
quality: 80,
|
||||||
fillWidth: 200,
|
fillWidth: 200,
|
||||||
fillHeight: 200,
|
fillHeight: 200,
|
||||||
},
|
})}
|
||||||
)}
|
|
||||||
className="item-detail-cast-card-image"
|
className="item-detail-cast-card-image"
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<div className="item-detail-cast-card-icon">
|
<div className="item-detail-cast-card-icon">
|
||||||
{getTypeIcon(
|
{getTypeIcon("Person")}
|
||||||
"Person",
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className="item-detail-cast-card-text">
|
<div className="item-detail-cast-card-text">
|
||||||
<Typography variant="subtitle1">
|
<Typography variant="subtitle1">{actor.Name}</Typography>
|
||||||
{actor.Name}
|
|
||||||
</Typography>
|
|
||||||
<Typography
|
<Typography
|
||||||
variant="subtitle2"
|
variant="subtitle2"
|
||||||
style={{
|
style={{
|
||||||
@@ -955,28 +815,21 @@ const EpisodeTitlePage = () => {
|
|||||||
>
|
>
|
||||||
{actor.PrimaryImageTag ? (
|
{actor.PrimaryImageTag ? (
|
||||||
<img
|
<img
|
||||||
src={api.getItemImageUrl(
|
alt={actor.Name}
|
||||||
actor.Id,
|
src={api.getItemImageUrl(actor.Id, "Primary", {
|
||||||
"Primary",
|
|
||||||
{
|
|
||||||
quality: 80,
|
quality: 80,
|
||||||
fillWidth: 200,
|
fillWidth: 200,
|
||||||
fillHeight: 200,
|
fillHeight: 200,
|
||||||
},
|
})}
|
||||||
)}
|
|
||||||
className="item-detail-cast-card-image"
|
className="item-detail-cast-card-image"
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<div className="item-detail-cast-card-icon">
|
<div className="item-detail-cast-card-icon">
|
||||||
{getTypeIcon(
|
{getTypeIcon("Person")}
|
||||||
"Person",
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className="item-detail-cast-card-text">
|
<div className="item-detail-cast-card-text">
|
||||||
<Typography variant="subtitle1">
|
<Typography variant="subtitle1">{actor.Name}</Typography>
|
||||||
{actor.Name}
|
|
||||||
</Typography>
|
|
||||||
<Typography
|
<Typography
|
||||||
variant="subtitle2"
|
variant="subtitle2"
|
||||||
style={{
|
style={{
|
||||||
@@ -993,9 +846,7 @@ const EpisodeTitlePage = () => {
|
|||||||
)}
|
)}
|
||||||
{directors.length > 0 && (
|
{directors.length > 0 && (
|
||||||
<div className="item-detail-cast-container">
|
<div className="item-detail-cast-container">
|
||||||
<Typography variant="h6">
|
<Typography variant="h6">Directors</Typography>
|
||||||
Directors
|
|
||||||
</Typography>
|
|
||||||
<div className="item-detail-cast-grid">
|
<div className="item-detail-cast-grid">
|
||||||
{directors.map((actor) => (
|
{directors.map((actor) => (
|
||||||
<NavLink
|
<NavLink
|
||||||
@@ -1005,28 +856,21 @@ const EpisodeTitlePage = () => {
|
|||||||
>
|
>
|
||||||
{actor.PrimaryImageTag ? (
|
{actor.PrimaryImageTag ? (
|
||||||
<img
|
<img
|
||||||
src={api.getItemImageUrl(
|
alt={actor.Name}
|
||||||
actor.Id,
|
src={api.getItemImageUrl(actor.Id, "Primary", {
|
||||||
"Primary",
|
|
||||||
{
|
|
||||||
quality: 80,
|
quality: 80,
|
||||||
fillWidth: 200,
|
fillWidth: 200,
|
||||||
fillHeight: 200,
|
fillHeight: 200,
|
||||||
},
|
})}
|
||||||
)}
|
|
||||||
className="item-detail-cast-card-image"
|
className="item-detail-cast-card-image"
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<div className="item-detail-cast-card-icon">
|
<div className="item-detail-cast-card-icon">
|
||||||
{getTypeIcon(
|
{getTypeIcon("Person")}
|
||||||
"Person",
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className="item-detail-cast-card-text">
|
<div className="item-detail-cast-card-text">
|
||||||
<Typography variant="subtitle1">
|
<Typography variant="subtitle1">{actor.Name}</Typography>
|
||||||
{actor.Name}
|
|
||||||
</Typography>
|
|
||||||
<Typography
|
<Typography
|
||||||
variant="subtitle2"
|
variant="subtitle2"
|
||||||
style={{
|
style={{
|
||||||
@@ -1043,9 +887,7 @@ const EpisodeTitlePage = () => {
|
|||||||
)}
|
)}
|
||||||
{producers.length > 0 && (
|
{producers.length > 0 && (
|
||||||
<div className="item-detail-cast-container">
|
<div className="item-detail-cast-container">
|
||||||
<Typography variant="h6">
|
<Typography variant="h6">Producers</Typography>
|
||||||
Producers
|
|
||||||
</Typography>
|
|
||||||
<div className="item-detail-cast-grid">
|
<div className="item-detail-cast-grid">
|
||||||
{producers.map((actor) => (
|
{producers.map((actor) => (
|
||||||
<NavLink
|
<NavLink
|
||||||
@@ -1055,28 +897,21 @@ const EpisodeTitlePage = () => {
|
|||||||
>
|
>
|
||||||
{actor.PrimaryImageTag ? (
|
{actor.PrimaryImageTag ? (
|
||||||
<img
|
<img
|
||||||
src={api.getItemImageUrl(
|
alt={actor.Name}
|
||||||
actor.Id,
|
src={api.getItemImageUrl(actor.Id, "Primary", {
|
||||||
"Primary",
|
|
||||||
{
|
|
||||||
quality: 80,
|
quality: 80,
|
||||||
fillWidth: 200,
|
fillWidth: 200,
|
||||||
fillHeight: 200,
|
fillHeight: 200,
|
||||||
},
|
})}
|
||||||
)}
|
|
||||||
className="item-detail-cast-card-image"
|
className="item-detail-cast-card-image"
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<div className="item-detail-cast-card-icon">
|
<div className="item-detail-cast-card-icon">
|
||||||
{getTypeIcon(
|
{getTypeIcon("Person")}
|
||||||
"Person",
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className="item-detail-cast-card-text">
|
<div className="item-detail-cast-card-text">
|
||||||
<Typography variant="subtitle1">
|
<Typography variant="subtitle1">{actor.Name}</Typography>
|
||||||
{actor.Name}
|
|
||||||
</Typography>
|
|
||||||
<Typography
|
<Typography
|
||||||
variant="subtitle2"
|
variant="subtitle2"
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
@@ -119,9 +119,9 @@ const FavoritePage = () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// Removing app's backdrop
|
|
||||||
setBackdrop("", "");
|
setBackdrop("", "");
|
||||||
}, []);
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<main
|
<main
|
||||||
className="scrollY"
|
className="scrollY"
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
|
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
|
|||||||
+27
-19
@@ -1,6 +1,5 @@
|
|||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import React, { useState, useLayoutEffect } from "react";
|
import React, { useState, useLayoutEffect } from "react";
|
||||||
import PropTypes from "prop-types";
|
|
||||||
|
|
||||||
import Box from "@mui/material/Box";
|
import Box from "@mui/material/Box";
|
||||||
import Chip from "@mui/material/Chip";
|
import Chip from "@mui/material/Chip";
|
||||||
@@ -15,7 +14,7 @@ import { green, red, yellow } from "@mui/material/colors";
|
|||||||
|
|
||||||
import { Blurhash } from "react-blurhash";
|
import { Blurhash } from "react-blurhash";
|
||||||
|
|
||||||
import { useParams, Link, NavLink } from "react-router-dom";
|
import { Link, NavLink, useParams } from "react-router-dom";
|
||||||
|
|
||||||
import { motion } from "framer-motion";
|
import { motion } from "framer-motion";
|
||||||
|
|
||||||
@@ -38,14 +37,14 @@ import "./item.module.scss";
|
|||||||
|
|
||||||
import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
||||||
|
|
||||||
import { useBackdropStore } from "../../utils/store/backdrop";
|
|
||||||
import { useApi } from "../../utils/store/api";
|
|
||||||
import { endsAt, getRuntime } from "../../utils/date/time";
|
|
||||||
import PlayButton from "../../components/buttons/playButton";
|
|
||||||
import LikeButton from "../../components/buttons/likeButton";
|
import LikeButton from "../../components/buttons/likeButton";
|
||||||
import MarkPlayedButton from "../../components/buttons/markPlayedButton";
|
import MarkPlayedButton from "../../components/buttons/markPlayedButton";
|
||||||
|
import PlayButton from "../../components/buttons/playButton";
|
||||||
import TextLink from "../../components/textLink";
|
import TextLink from "../../components/textLink";
|
||||||
import { getTypeIcon } from "../../components/utils/iconsCollection";
|
import { getTypeIcon } from "../../components/utils/iconsCollection";
|
||||||
|
import { endsAt, getRuntime } from "../../utils/date/time";
|
||||||
|
import { useApi } from "../../utils/store/api";
|
||||||
|
import { useBackdropStore } from "../../utils/store/backdrop";
|
||||||
|
|
||||||
function TabPanel(props) {
|
function TabPanel(props) {
|
||||||
const { children, value, index, ...other } = props;
|
const { children, value, index, ...other } = props;
|
||||||
@@ -179,7 +178,7 @@ const ItemDetail = () => {
|
|||||||
setAudioTracks(audios);
|
setAudioTracks(audios);
|
||||||
setSubtitleTracks(subs);
|
setSubtitleTracks(subs);
|
||||||
}
|
}
|
||||||
}, [item.isSuccess]);
|
});
|
||||||
|
|
||||||
const [setAppBackdrop] = useBackdropStore((state) => [state.setBackdrop]);
|
const [setAppBackdrop] = useBackdropStore((state) => [state.setBackdrop]);
|
||||||
|
|
||||||
@@ -187,6 +186,7 @@ const ItemDetail = () => {
|
|||||||
const [writers, setWriters] = useState([]);
|
const [writers, setWriters] = useState([]);
|
||||||
const [actors, setActors] = useState([]);
|
const [actors, setActors] = useState([]);
|
||||||
const [producers, setProducers] = useState([]);
|
const [producers, setProducers] = useState([]);
|
||||||
|
|
||||||
useLayoutEffect(() => {
|
useLayoutEffect(() => {
|
||||||
if (item.isSuccess) {
|
if (item.isSuccess) {
|
||||||
setAppBackdrop(
|
setAppBackdrop(
|
||||||
@@ -207,7 +207,7 @@ const ItemDetail = () => {
|
|||||||
const actorTp = item.data.People.filter((itm) => itm.Type === "Actor");
|
const actorTp = item.data.People.filter((itm) => itm.Type === "Actor");
|
||||||
setActors(actorTp);
|
setActors(actorTp);
|
||||||
}
|
}
|
||||||
}, [item.isSuccess]);
|
});
|
||||||
|
|
||||||
const qualityLabel = () => {
|
const qualityLabel = () => {
|
||||||
if (
|
if (
|
||||||
@@ -287,16 +287,14 @@ const ItemDetail = () => {
|
|||||||
<div className="item-hero-backdrop-container">
|
<div className="item-hero-backdrop-container">
|
||||||
{item.data.BackdropImageTags ? (
|
{item.data.BackdropImageTags ? (
|
||||||
<img
|
<img
|
||||||
src={api.getItemImageUrl(
|
alt={item.data.Name}
|
||||||
item.data.Id,
|
src={api.getItemImageUrl(item.data.Id, "Backdrop", {
|
||||||
"Backdrop",
|
tag: item.data.BackdropImageTags[0],
|
||||||
{
|
})}
|
||||||
tag: item.data
|
|
||||||
.BackdropImageTags[0],
|
|
||||||
},
|
|
||||||
)}
|
|
||||||
className="item-hero-backdrop"
|
className="item-hero-backdrop"
|
||||||
onLoad={(e) => (e.currentTarget.style.opacity = 1)}
|
onLoad={(e) => {
|
||||||
|
e.currentTarget.style.opacity = 1;
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<></>
|
<></>
|
||||||
@@ -319,11 +317,14 @@ const ItemDetail = () => {
|
|||||||
className="item-hero-image-blurhash"
|
className="item-hero-image-blurhash"
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
|
alt={item.data.Name}
|
||||||
src={api.getItemImageUrl(item.data.Id, "Primary", {
|
src={api.getItemImageUrl(item.data.Id, "Primary", {
|
||||||
quality: 90,
|
quality: 90,
|
||||||
tag: item.data.ImageTags.Primary,
|
tag: item.data.ImageTags.Primary,
|
||||||
})}
|
})}
|
||||||
onLoad={(e) => (e.currentTarget.style.opacity = 1)}
|
onLoad={(e) => {
|
||||||
|
e.currentTarget.style.opacity = 1;
|
||||||
|
}}
|
||||||
className="item-hero-image"
|
className="item-hero-image"
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
@@ -334,12 +335,15 @@ const ItemDetail = () => {
|
|||||||
<div className="item-hero-detail flex flex-column">
|
<div className="item-hero-detail flex flex-column">
|
||||||
{Object.keys(item.data.ImageTags).includes("Logo") ? (
|
{Object.keys(item.data.ImageTags).includes("Logo") ? (
|
||||||
<img
|
<img
|
||||||
|
alt={item.data.Name}
|
||||||
src={api.getItemImageUrl(item.data.Id, "Logo", {
|
src={api.getItemImageUrl(item.data.Id, "Logo", {
|
||||||
quality: 90,
|
quality: 90,
|
||||||
fillWidth: 592,
|
fillWidth: 592,
|
||||||
fillHeight: 592,
|
fillHeight: 592,
|
||||||
})}
|
})}
|
||||||
onLoad={(e) => (e.currentTarget.style.opacity = 1)}
|
onLoad={(e) => {
|
||||||
|
e.currentTarget.style.opacity = 1;
|
||||||
|
}}
|
||||||
className="item-hero-logo"
|
className="item-hero-logo"
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
@@ -755,6 +759,7 @@ const ItemDetail = () => {
|
|||||||
>
|
>
|
||||||
{actor.PrimaryImageTag ? (
|
{actor.PrimaryImageTag ? (
|
||||||
<img
|
<img
|
||||||
|
alt={actor.Name}
|
||||||
src={api.getItemImageUrl(actor.Id, "Primary", {
|
src={api.getItemImageUrl(actor.Id, "Primary", {
|
||||||
quality: 80,
|
quality: 80,
|
||||||
fillWidth: 200,
|
fillWidth: 200,
|
||||||
@@ -795,6 +800,7 @@ const ItemDetail = () => {
|
|||||||
>
|
>
|
||||||
{actor.PrimaryImageTag ? (
|
{actor.PrimaryImageTag ? (
|
||||||
<img
|
<img
|
||||||
|
alt={actor.Name}
|
||||||
src={api.getItemImageUrl(actor.Id, "Primary", {
|
src={api.getItemImageUrl(actor.Id, "Primary", {
|
||||||
quality: 80,
|
quality: 80,
|
||||||
fillWidth: 200,
|
fillWidth: 200,
|
||||||
@@ -835,6 +841,7 @@ const ItemDetail = () => {
|
|||||||
>
|
>
|
||||||
{actor.PrimaryImageTag ? (
|
{actor.PrimaryImageTag ? (
|
||||||
<img
|
<img
|
||||||
|
alt={actor.Name}
|
||||||
src={api.getItemImageUrl(actor.Id, "Primary", {
|
src={api.getItemImageUrl(actor.Id, "Primary", {
|
||||||
quality: 80,
|
quality: 80,
|
||||||
fillWidth: 200,
|
fillWidth: 200,
|
||||||
@@ -875,6 +882,7 @@ const ItemDetail = () => {
|
|||||||
>
|
>
|
||||||
{actor.PrimaryImageTag ? (
|
{actor.PrimaryImageTag ? (
|
||||||
<img
|
<img
|
||||||
|
alt={actor.Name}
|
||||||
src={api.getItemImageUrl(actor.Id, "Primary", {
|
src={api.getItemImageUrl(actor.Id, "Primary", {
|
||||||
quality: 80,
|
quality: 80,
|
||||||
fillWidth: 200,
|
fillWidth: 200,
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ const LibraryView = () => {
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [currentLib.isSuccess]);
|
});
|
||||||
|
|
||||||
const [filterArray, setFilterArray] = useState([]);
|
const [filterArray, setFilterArray] = useState([]);
|
||||||
|
|
||||||
|
|||||||
@@ -226,13 +226,7 @@ const PersonTitlePage = () => {
|
|||||||
setActivePersonTab(4);
|
setActivePersonTab(4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [
|
});
|
||||||
personMovies.isPending,
|
|
||||||
personShows.isPending,
|
|
||||||
personBooks.isPending,
|
|
||||||
personPhotos.isPending,
|
|
||||||
personEpisodes.isPending,
|
|
||||||
]);
|
|
||||||
const [setAppBackdrop] = useBackdropStore((state) => [state.setBackdrop]);
|
const [setAppBackdrop] = useBackdropStore((state) => [state.setBackdrop]);
|
||||||
|
|
||||||
const [animationDirection, setAnimationDirection] = useState("forward");
|
const [animationDirection, setAnimationDirection] = useState("forward");
|
||||||
@@ -247,7 +241,7 @@ const PersonTitlePage = () => {
|
|||||||
item.data.Id,
|
item.data.Id,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}, [item.isSuccess]);
|
});
|
||||||
|
|
||||||
if (item.isPending) {
|
if (item.isPending) {
|
||||||
return (
|
return (
|
||||||
@@ -308,10 +302,10 @@ const PersonTitlePage = () => {
|
|||||||
setActivePersonTab(newVal);
|
setActivePersonTab(newVal);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{personTabs.map((tab, index) => {
|
{personTabs.map((tab) => {
|
||||||
return (
|
return (
|
||||||
<Tab
|
<Tab
|
||||||
key={index}
|
key={tab.title}
|
||||||
label={tab.title}
|
label={tab.title}
|
||||||
disabled={tab.data.data?.TotalRecordCount === 0}
|
disabled={tab.data.data?.TotalRecordCount === 0}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ export const VideoPlayer = () => {
|
|||||||
playerRef.current.seekTo(timeToStart, "seconds");
|
playerRef.current.seekTo(timeToStart, "seconds");
|
||||||
setIsReady(true);
|
setIsReady(true);
|
||||||
}
|
}
|
||||||
}, [isReady]);
|
});
|
||||||
|
|
||||||
const handleDisplayCurrentTime = () => {
|
const handleDisplayCurrentTime = () => {
|
||||||
let time = ticksToSec(progress * itemDuration);
|
let time = ticksToSec(progress * itemDuration);
|
||||||
@@ -249,6 +249,7 @@ export const VideoPlayer = () => {
|
|||||||
setItemName(
|
setItemName(
|
||||||
<div className="video-osd-name">
|
<div className="video-osd-name">
|
||||||
<img
|
<img
|
||||||
|
alt="Series Logo"
|
||||||
src={`${api.basePath}/Items/${
|
src={`${api.basePath}/Items/${
|
||||||
episodes.data.Items[currentEpisodeIndex + 1].SeriesId
|
episodes.data.Items[currentEpisodeIndex + 1].SeriesId
|
||||||
}/Images/Logo`}
|
}/Images/Logo`}
|
||||||
@@ -323,6 +324,7 @@ export const VideoPlayer = () => {
|
|||||||
setItemName(
|
setItemName(
|
||||||
<div className="video-osd-name">
|
<div className="video-osd-name">
|
||||||
<img
|
<img
|
||||||
|
alt="Series Logo"
|
||||||
src={`${api.basePath}/Items/${
|
src={`${api.basePath}/Items/${
|
||||||
episodes.data.Items[currentEpisodeIndex - 1].SeriesId
|
episodes.data.Items[currentEpisodeIndex - 1].SeriesId
|
||||||
}/Images/Logo`}
|
}/Images/Logo`}
|
||||||
@@ -434,7 +436,7 @@ export const VideoPlayer = () => {
|
|||||||
return () => {
|
return () => {
|
||||||
clearTimeout(timeout);
|
clearTimeout(timeout);
|
||||||
};
|
};
|
||||||
}, [volume]);
|
});
|
||||||
|
|
||||||
const handleExit = async () => {
|
const handleExit = async () => {
|
||||||
// Remove app from fullscreen
|
// Remove app from fullscreen
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ const PlaylistTitlePage = () => {
|
|||||||
item.data.Id,
|
item.data.Id,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}, [item.isSuccess]);
|
});
|
||||||
|
|
||||||
if (item.isPending || similarItems.isPending) {
|
if (item.isPending || similarItems.isPending) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ const SearchPage = () => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// Removing app's backdrop
|
// Removing app's backdrop
|
||||||
setBackdrop("", "");
|
setBackdrop("", "");
|
||||||
}, []);
|
});
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="scrollY"
|
className="scrollY"
|
||||||
|
|||||||
+43
-66
@@ -203,6 +203,7 @@ const SeriesTitlePage = () => {
|
|||||||
const [writers, setWriters] = useState([]);
|
const [writers, setWriters] = useState([]);
|
||||||
const [actors, setActors] = useState([]);
|
const [actors, setActors] = useState([]);
|
||||||
const [producers, setProducers] = useState([]);
|
const [producers, setProducers] = useState([]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (item.isSuccess) {
|
if (item.isSuccess) {
|
||||||
setAppBackdrop(
|
setAppBackdrop(
|
||||||
@@ -223,7 +224,7 @@ const SeriesTitlePage = () => {
|
|||||||
const actorTp = item.data.People.filter((itm) => itm.Type === "Actor");
|
const actorTp = item.data.People.filter((itm) => itm.Type === "Actor");
|
||||||
setActors(actorTp);
|
setActors(actorTp);
|
||||||
}
|
}
|
||||||
}, [item.isSuccess]);
|
});
|
||||||
|
|
||||||
if (item.isPending || similarItems.isPending) {
|
if (item.isPending || similarItems.isPending) {
|
||||||
return (
|
return (
|
||||||
@@ -260,16 +261,14 @@ const SeriesTitlePage = () => {
|
|||||||
<div className="item-hero-backdrop-container">
|
<div className="item-hero-backdrop-container">
|
||||||
{item.data.BackdropImageTags ? (
|
{item.data.BackdropImageTags ? (
|
||||||
<img
|
<img
|
||||||
src={api.getItemImageUrl(
|
alt={item.data.Name}
|
||||||
item.data.Id,
|
src={api.getItemImageUrl(item.data.Id, "Backdrop", {
|
||||||
"Backdrop",
|
tag: item.data.BackdropImageTags[0],
|
||||||
{
|
})}
|
||||||
tag: item.data
|
|
||||||
.BackdropImageTags[0],
|
|
||||||
},
|
|
||||||
)}
|
|
||||||
className="item-hero-backdrop"
|
className="item-hero-backdrop"
|
||||||
onLoad={(e) => (e.currentTarget.style.opacity = 1)}
|
onLoad={(e) => {
|
||||||
|
e.currentTarget.style.opacity = 1;
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<></>
|
<></>
|
||||||
@@ -292,11 +291,14 @@ const SeriesTitlePage = () => {
|
|||||||
className="item-hero-image-blurhash"
|
className="item-hero-image-blurhash"
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
|
alt={item.data.Name}
|
||||||
src={api.getItemImageUrl(item.data.Id, "Primary", {
|
src={api.getItemImageUrl(item.data.Id, "Primary", {
|
||||||
quality: 90,
|
quality: 90,
|
||||||
tag: item.data.ImageTags.Primary,
|
tag: item.data.ImageTags.Primary,
|
||||||
})}
|
})}
|
||||||
onLoad={(e) => (e.currentTarget.style.opacity = 1)}
|
onLoad={(e) => {
|
||||||
|
e.currentTarget.style.opacity = 1;
|
||||||
|
}}
|
||||||
className="item-hero-image"
|
className="item-hero-image"
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
@@ -307,12 +309,15 @@ const SeriesTitlePage = () => {
|
|||||||
<div className="item-hero-detail flex flex-column">
|
<div className="item-hero-detail flex flex-column">
|
||||||
{Object.keys(item.data.ImageTags).includes("Logo") ? (
|
{Object.keys(item.data.ImageTags).includes("Logo") ? (
|
||||||
<img
|
<img
|
||||||
|
alt={item.data.Name}
|
||||||
src={api.getItemImageUrl(item.data.Id, "Logo", {
|
src={api.getItemImageUrl(item.data.Id, "Logo", {
|
||||||
quality: 90,
|
quality: 90,
|
||||||
fillWidth: 592,
|
fillWidth: 592,
|
||||||
fillHeight: 592,
|
fillHeight: 592,
|
||||||
})}
|
})}
|
||||||
onLoad={(e) => (e.currentTarget.style.opacity = 1)}
|
onLoad={(e) => {
|
||||||
|
e.currentTarget.style.opacity = 1;
|
||||||
|
}}
|
||||||
className="item-hero-logo"
|
className="item-hero-logo"
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
@@ -592,6 +597,7 @@ const SeriesTitlePage = () => {
|
|||||||
>
|
>
|
||||||
{actor.PrimaryImageTag ? (
|
{actor.PrimaryImageTag ? (
|
||||||
<img
|
<img
|
||||||
|
alt={actor.Name}
|
||||||
src={api.getItemImageUrl(actor.Id, "Primary", {
|
src={api.getItemImageUrl(actor.Id, "Primary", {
|
||||||
quality: 80,
|
quality: 80,
|
||||||
fillWidth: 200,
|
fillWidth: 200,
|
||||||
@@ -636,6 +642,7 @@ const SeriesTitlePage = () => {
|
|||||||
>
|
>
|
||||||
{actor.PrimaryImageTag ? (
|
{actor.PrimaryImageTag ? (
|
||||||
<img
|
<img
|
||||||
|
alt={actor.Name}
|
||||||
src={api.getItemImageUrl(actor.Id, "Primary", {
|
src={api.getItemImageUrl(actor.Id, "Primary", {
|
||||||
quality: 80,
|
quality: 80,
|
||||||
fillWidth: 200,
|
fillWidth: 200,
|
||||||
@@ -680,6 +687,7 @@ const SeriesTitlePage = () => {
|
|||||||
>
|
>
|
||||||
{actor.PrimaryImageTag ? (
|
{actor.PrimaryImageTag ? (
|
||||||
<img
|
<img
|
||||||
|
alt={actor.Name}
|
||||||
src={api.getItemImageUrl(actor.Id, "Primary", {
|
src={api.getItemImageUrl(actor.Id, "Primary", {
|
||||||
quality: 80,
|
quality: 80,
|
||||||
fillWidth: 200,
|
fillWidth: 200,
|
||||||
@@ -724,6 +732,7 @@ const SeriesTitlePage = () => {
|
|||||||
>
|
>
|
||||||
{actor.PrimaryImageTag ? (
|
{actor.PrimaryImageTag ? (
|
||||||
<img
|
<img
|
||||||
|
alt={actor.Name}
|
||||||
src={api.getItemImageUrl(actor.Id, "Primary", {
|
src={api.getItemImageUrl(actor.Id, "Primary", {
|
||||||
quality: 80,
|
quality: 80,
|
||||||
fillWidth: 200,
|
fillWidth: 200,
|
||||||
@@ -874,14 +883,12 @@ const SeriesTitlePage = () => {
|
|||||||
<Divider />
|
<Divider />
|
||||||
<div className="item-detail-episodes-container">
|
<div className="item-detail-episodes-container">
|
||||||
{episodes.isPending
|
{episodes.isPending
|
||||||
? Array.from(new Array(4)).map(
|
? Array.from(new Array(4)).map((a, index) => {
|
||||||
(a, index) => {
|
|
||||||
return (
|
return (
|
||||||
<MuiCard
|
<MuiCard
|
||||||
key={a}
|
key={a}
|
||||||
sx={{
|
sx={{
|
||||||
background:
|
background: "transparent",
|
||||||
"transparent",
|
|
||||||
width: "100%",
|
width: "100%",
|
||||||
}}
|
}}
|
||||||
elevation={0}
|
elevation={0}
|
||||||
@@ -891,44 +898,30 @@ const SeriesTitlePage = () => {
|
|||||||
// animation="wave"
|
// animation="wave"
|
||||||
variant="rectangular"
|
variant="rectangular"
|
||||||
sx={{
|
sx={{
|
||||||
aspectRatio:
|
aspectRatio: "1.777",
|
||||||
"1.777",
|
|
||||||
height: "auto",
|
height: "auto",
|
||||||
m: 1,
|
m: 1,
|
||||||
borderRadius:
|
borderRadius: "10px",
|
||||||
"10px",
|
animationDelay: `${index * 0.2}s`,
|
||||||
animationDelay: `${
|
animationDuration: "1.4s",
|
||||||
index *
|
animationName: "pulse",
|
||||||
0.2
|
|
||||||
}s`,
|
|
||||||
animationDuration:
|
|
||||||
"1.4s",
|
|
||||||
animationName:
|
|
||||||
"pulse",
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</CardMedia>
|
</CardMedia>
|
||||||
<CardContent
|
<CardContent
|
||||||
sx={{
|
sx={{
|
||||||
padding: "0 0.5em",
|
padding: "0 0.5em",
|
||||||
alignItems:
|
alignItems: "flex-start",
|
||||||
"flex-start",
|
backgroundColor: "transparent",
|
||||||
backgroundColor:
|
|
||||||
"transparent",
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography variant="h6">
|
<Typography variant="h6">
|
||||||
<Skeleton
|
<Skeleton
|
||||||
variant="text"
|
variant="text"
|
||||||
sx={{
|
sx={{
|
||||||
animationDelay: `${
|
animationDelay: `${index * 0.2}s`,
|
||||||
index *
|
animationDuration: "1.4s",
|
||||||
0.2
|
animationName: "pulse",
|
||||||
}s`,
|
|
||||||
animationDuration:
|
|
||||||
"1.4s",
|
|
||||||
animationName:
|
|
||||||
"pulse",
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Typography>
|
</Typography>
|
||||||
@@ -937,49 +930,33 @@ const SeriesTitlePage = () => {
|
|||||||
<Skeleton
|
<Skeleton
|
||||||
variant="text"
|
variant="text"
|
||||||
sx={{
|
sx={{
|
||||||
animationDelay: `${
|
animationDelay: `${index * 0.2}s`,
|
||||||
index *
|
animationDuration: "1.4s",
|
||||||
0.2
|
animationName: "pulse",
|
||||||
}s`,
|
|
||||||
animationDuration:
|
|
||||||
"1.4s",
|
|
||||||
animationName:
|
|
||||||
"pulse",
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Skeleton
|
<Skeleton
|
||||||
variant="text"
|
variant="text"
|
||||||
sx={{
|
sx={{
|
||||||
animationDelay: `${
|
animationDelay: `${index * 0.2}s`,
|
||||||
index *
|
animationDuration: "1.4s",
|
||||||
0.2
|
animationName: "pulse",
|
||||||
}s`,
|
|
||||||
animationDuration:
|
|
||||||
"1.4s",
|
|
||||||
animationName:
|
|
||||||
"pulse",
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Skeleton
|
<Skeleton
|
||||||
variant="text"
|
variant="text"
|
||||||
sx={{
|
sx={{
|
||||||
animationDelay: `${
|
animationDelay: `${index * 0.2}s`,
|
||||||
index *
|
animationDuration: "1.4s",
|
||||||
0.2
|
animationName: "pulse",
|
||||||
}s`,
|
|
||||||
animationDuration:
|
|
||||||
"1.4s",
|
|
||||||
animationName:
|
|
||||||
"pulse",
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Typography>
|
</Typography>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</MuiCard>
|
</MuiCard>
|
||||||
);
|
);
|
||||||
},
|
})
|
||||||
)
|
|
||||||
: episodes.data.Items.map((episode) => {
|
: episodes.data.Items.map((episode) => {
|
||||||
return (
|
return (
|
||||||
<motion.div
|
<motion.div
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
const Settings = () => {
|
const Settings = () => {
|
||||||
return <h1>WIP Settings</h1>;
|
return <h1>WIP Settings</h1>;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export const formateDate = (date) => {
|
export const formateDate = (date) => {
|
||||||
date = new Date(date);
|
let date = new Date(date);
|
||||||
date = new Intl.DateTimeFormat().format(date);
|
date = new Intl.DateTimeFormat().format(date);
|
||||||
return date;
|
return date;
|
||||||
};
|
};
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
// see https://github.com/tannerlinsley/react-query/issues/293
|
// see https://github.com/tannerlinsley/react-query/issues/293
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import { useEffect, useMemo, useState } from "react";
|
import { useEffect, useMemo, useState } from "react";
|
||||||
|
|
||||||
const useIntersecting = (ref) => {
|
const useIntersecting = (ref) => {
|
||||||
@@ -9,13 +8,12 @@ const useIntersecting = (ref) => {
|
|||||||
new IntersectionObserver(([entry]) =>
|
new IntersectionObserver(([entry]) =>
|
||||||
setIntersecting(entry.isIntersecting),
|
setIntersecting(entry.isIntersecting),
|
||||||
),
|
),
|
||||||
[ref],
|
|
||||||
);
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
observer.observe(ref.current);
|
observer.observe(ref.current);
|
||||||
return () => observer.disconnect();
|
return () => observer.disconnect();
|
||||||
}, []);
|
});
|
||||||
|
|
||||||
return isIntersecting;
|
return isIntersecting;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ const useKeyPress = (targetKey) => {
|
|||||||
window.removeEventListener("keydown", downHandler);
|
window.removeEventListener("keydown", downHandler);
|
||||||
window.removeEventListener("keyup", upHandler);
|
window.removeEventListener("keyup", upHandler);
|
||||||
};
|
};
|
||||||
}, []); // Empty array ensures that effect is only run on mount and unmount
|
}); // Empty array ensures that effect is only run on mount and unmount
|
||||||
return keyPressed;
|
return keyPressed;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export const setServer = async (serverId: string, serverInfo: ServerInfo) => {
|
|||||||
* Set default server
|
* Set default server
|
||||||
*/
|
*/
|
||||||
export const setDefaultServer = async (
|
export const setDefaultServer = async (
|
||||||
serverId: ServerStore["defaultServer"]
|
serverId: ServerStore["defaultServer"],
|
||||||
) => {
|
) => {
|
||||||
await store.set("defaultServer", serverId);
|
await store.set("defaultServer", serverId);
|
||||||
await store.save();
|
await store.save();
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ export const useApi = create<{
|
|||||||
|
|
||||||
export const createApi = (
|
export const createApi = (
|
||||||
serverAddress: string,
|
serverAddress: string,
|
||||||
accessToken: string | undefined
|
accessToken: string | undefined,
|
||||||
) =>
|
) =>
|
||||||
useApi.setState((state) => ({
|
useApi.setState((state) => ({
|
||||||
...state,
|
...state,
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import { create } from "zustand";
|
import { create } from "zustand";
|
||||||
|
|
||||||
const initialState = {
|
const initialState = {
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import { create } from "zustand";
|
import { create } from "zustand";
|
||||||
|
|
||||||
export const useBackdropStore = create((set) => ({
|
export const useBackdropStore = create((set) => ({
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import { create } from "zustand";
|
import { create } from "zustand";
|
||||||
|
|
||||||
export const useCarouselStore = create((set) => ({
|
export const useCarouselStore = create((set) => ({
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import { create } from "zustand";
|
import { create } from "zustand";
|
||||||
import { version } from "../../../package.json";
|
import { version } from "../../../package.json";
|
||||||
import { getAllServers, getDefaultServer, getServer } from "../storage/servers";
|
import { getAllServers, getDefaultServer, getServer } from "../storage/servers";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import { create } from "zustand";
|
import { create } from "zustand";
|
||||||
|
|
||||||
export const useDrawerStore = create((set) => ({
|
export const useDrawerStore = create((set) => ({
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import { create } from "zustand";
|
import { create } from "zustand";
|
||||||
|
|
||||||
export const usePlaybackStore = create((set) => ({
|
export const usePlaybackStore = create((set) => ({
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import { create } from "zustand";
|
import { create } from "zustand";
|
||||||
|
|
||||||
export const useServerStore = create(() => ({
|
export const useServerStore = create(() => ({
|
||||||
|
|||||||
Reference in new issue
Block a user