disable play button on series
This commit is contained in:
1 file changed
+30
-3
@@ -34,6 +34,7 @@ import { useParams, useNavigate, Link as RouterLink } from "react-router-dom";
|
||||
import {
|
||||
BaseItemKind,
|
||||
ItemFields,
|
||||
LocationType,
|
||||
MediaStreamType,
|
||||
SortOrder,
|
||||
} from "@jellyfin/sdk/lib/generated-client";
|
||||
@@ -66,6 +67,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 { Tooltip } from "@mui/material";
|
||||
function TabPanel(props) {
|
||||
const { children, value, index, ...other } = props;
|
||||
|
||||
@@ -168,6 +170,7 @@ const ItemDetail = () => {
|
||||
queryFn: async () => {
|
||||
const result = await getTvShowsApi(window.api).getSeasons({
|
||||
seriesId: item.data.Id,
|
||||
isSpecialSeason: false,
|
||||
});
|
||||
return result.data;
|
||||
},
|
||||
@@ -200,6 +203,7 @@ const ItemDetail = () => {
|
||||
userId: user.data.Id,
|
||||
parentId: seasons.data.Items[currentSeason].Id,
|
||||
fields: [ItemFields.SeasonUserData, "Overview"],
|
||||
excludeLocationTypes: [LocationType.Virtual],
|
||||
});
|
||||
return result.data;
|
||||
},
|
||||
@@ -1013,7 +1017,25 @@ const ItemDetail = () => {
|
||||
"Music",
|
||||
) && (
|
||||
<>
|
||||
<Tooltip
|
||||
title={
|
||||
item.data
|
||||
.Type ==
|
||||
"Series"
|
||||
? "Work in progress, meanwhile you can play individual episodes by clicking on episode card below"
|
||||
: ""
|
||||
}
|
||||
>
|
||||
<span>
|
||||
<Button
|
||||
disabled={
|
||||
item
|
||||
.data
|
||||
.Type ==
|
||||
"Series"
|
||||
? true
|
||||
: false
|
||||
}
|
||||
variant="contained"
|
||||
size="large"
|
||||
startIcon={
|
||||
@@ -1072,15 +1094,18 @@ const ItemDetail = () => {
|
||||
);
|
||||
}}
|
||||
>
|
||||
{!!item.data
|
||||
{!!item
|
||||
.data
|
||||
.UserData
|
||||
.PlayedPercentage &&
|
||||
item.data.UserData
|
||||
item.data
|
||||
.UserData
|
||||
.PlayedPercentage >
|
||||
0
|
||||
? "Resume"
|
||||
: "Play"}
|
||||
{!!item.data
|
||||
{!!item
|
||||
.data
|
||||
.UserData
|
||||
.PlayedPercentage && (
|
||||
<LinearProgress
|
||||
@@ -1105,6 +1130,8 @@ const ItemDetail = () => {
|
||||
/>
|
||||
)}
|
||||
</Button>
|
||||
</span>
|
||||
</Tooltip>
|
||||
|
||||
<IconButton
|
||||
onClick={
|
||||
|
||||
Reference in new issue
Block a user