|
|
@ -149,7 +149,13 @@ const TvDetails = ({ tv }: TvDetailsProps) => {
|
|
|
|
|
|
|
|
|
|
|
|
const mediaLinks: PlayButtonLink[] = [];
|
|
|
|
const mediaLinks: PlayButtonLink[] = [];
|
|
|
|
|
|
|
|
|
|
|
|
if (plexUrl) {
|
|
|
|
if (
|
|
|
|
|
|
|
|
settings.currentSettings.seriesEnabled &&
|
|
|
|
|
|
|
|
plexUrl &&
|
|
|
|
|
|
|
|
hasPermission([Permission.REQUEST, Permission.REQUEST_TV], {
|
|
|
|
|
|
|
|
type: 'or',
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
) {
|
|
|
|
mediaLinks.push({
|
|
|
|
mediaLinks.push({
|
|
|
|
text: intl.formatMessage(messages.playonplex),
|
|
|
|
text: intl.formatMessage(messages.playonplex),
|
|
|
|
url: plexUrl,
|
|
|
|
url: plexUrl,
|
|
|
@ -337,6 +343,17 @@ const TvDetails = ({ tv }: TvDetailsProps) => {
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="media-title">
|
|
|
|
<div className="media-title">
|
|
|
|
<div className="media-status">
|
|
|
|
<div className="media-status">
|
|
|
|
|
|
|
|
{settings.currentSettings.seriesEnabled &&
|
|
|
|
|
|
|
|
hasPermission(
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
Permission.MANAGE_REQUESTS,
|
|
|
|
|
|
|
|
Permission.REQUEST,
|
|
|
|
|
|
|
|
Permission.REQUEST_TV,
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
type: 'or',
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
) && (
|
|
|
|
<StatusBadge
|
|
|
|
<StatusBadge
|
|
|
|
status={data.mediaInfo?.status}
|
|
|
|
status={data.mediaInfo?.status}
|
|
|
|
downloadItem={data.mediaInfo?.downloadStatus}
|
|
|
|
downloadItem={data.mediaInfo?.downloadStatus}
|
|
|
@ -347,6 +364,7 @@ const TvDetails = ({ tv }: TvDetailsProps) => {
|
|
|
|
plexUrl={plexUrl}
|
|
|
|
plexUrl={plexUrl}
|
|
|
|
serviceUrl={data.mediaInfo?.serviceUrl}
|
|
|
|
serviceUrl={data.mediaInfo?.serviceUrl}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
)}
|
|
|
|
{settings.currentSettings.series4kEnabled &&
|
|
|
|
{settings.currentSettings.series4kEnabled &&
|
|
|
|
hasPermission(
|
|
|
|
hasPermission(
|
|
|
|
[
|
|
|
|
[
|
|
|
@ -404,8 +422,12 @@ const TvDetails = ({ tv }: TvDetailsProps) => {
|
|
|
|
isShowComplete={isComplete}
|
|
|
|
isShowComplete={isComplete}
|
|
|
|
is4kShowComplete={is4kComplete}
|
|
|
|
is4kShowComplete={is4kComplete}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
{(data.mediaInfo?.status === MediaStatus.AVAILABLE ||
|
|
|
|
{((settings.currentSettings.seriesEnabled &&
|
|
|
|
data.mediaInfo?.status === MediaStatus.PARTIALLY_AVAILABLE ||
|
|
|
|
hasPermission([Permission.REQUEST, Permission.REQUEST_TV], {
|
|
|
|
|
|
|
|
type: 'or',
|
|
|
|
|
|
|
|
}) &&
|
|
|
|
|
|
|
|
(data.mediaInfo?.status === MediaStatus.AVAILABLE ||
|
|
|
|
|
|
|
|
data?.mediaInfo?.status === MediaStatus.PARTIALLY_AVAILABLE)) ||
|
|
|
|
(settings.currentSettings.series4kEnabled &&
|
|
|
|
(settings.currentSettings.series4kEnabled &&
|
|
|
|
hasPermission([Permission.REQUEST_4K, Permission.REQUEST_4K_TV], {
|
|
|
|
hasPermission([Permission.REQUEST_4K, Permission.REQUEST_4K_TV], {
|
|
|
|
type: 'or',
|
|
|
|
type: 'or',
|
|
|
@ -524,6 +546,18 @@ const TvDetails = ({ tv }: TvDetailsProps) => {
|
|
|
|
.reverse()
|
|
|
|
.reverse()
|
|
|
|
.filter((season) => season.seasonNumber !== 0)
|
|
|
|
.filter((season) => season.seasonNumber !== 0)
|
|
|
|
.map((season) => {
|
|
|
|
.map((season) => {
|
|
|
|
|
|
|
|
const showNon4k =
|
|
|
|
|
|
|
|
settings.currentSettings.seriesEnabled &&
|
|
|
|
|
|
|
|
hasPermission(
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
Permission.MANAGE_REQUESTS,
|
|
|
|
|
|
|
|
Permission.REQUEST,
|
|
|
|
|
|
|
|
Permission.REQUEST_TV,
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
type: 'or',
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
);
|
|
|
|
const show4k =
|
|
|
|
const show4k =
|
|
|
|
settings.currentSettings.series4kEnabled &&
|
|
|
|
settings.currentSettings.series4kEnabled &&
|
|
|
|
hasPermission(
|
|
|
|
hasPermission(
|
|
|
@ -588,11 +622,14 @@ const TvDetails = ({ tv }: TvDetailsProps) => {
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{((!mSeason &&
|
|
|
|
{((!mSeason &&
|
|
|
|
request?.status === MediaRequestStatus.APPROVED) ||
|
|
|
|
request?.status === MediaRequestStatus.APPROVED) ||
|
|
|
|
mSeason?.status === MediaStatus.PROCESSING) && (
|
|
|
|
mSeason?.status === MediaStatus.PROCESSING) &&
|
|
|
|
|
|
|
|
showNon4k && (
|
|
|
|
<>
|
|
|
|
<>
|
|
|
|
<div className="hidden md:flex">
|
|
|
|
<div className="hidden md:flex">
|
|
|
|
<Badge badgeType="primary">
|
|
|
|
<Badge badgeType="primary">
|
|
|
|
{intl.formatMessage(globalMessages.requested)}
|
|
|
|
{intl.formatMessage(
|
|
|
|
|
|
|
|
globalMessages.requested
|
|
|
|
|
|
|
|
)}
|
|
|
|
</Badge>
|
|
|
|
</Badge>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="flex md:hidden">
|
|
|
|
<div className="flex md:hidden">
|
|
|
@ -604,7 +641,8 @@ const TvDetails = ({ tv }: TvDetailsProps) => {
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
{((!mSeason &&
|
|
|
|
{((!mSeason &&
|
|
|
|
request?.status === MediaRequestStatus.PENDING) ||
|
|
|
|
request?.status === MediaRequestStatus.PENDING) ||
|
|
|
|
mSeason?.status === MediaStatus.PENDING) && (
|
|
|
|
mSeason?.status === MediaStatus.PENDING) &&
|
|
|
|
|
|
|
|
showNon4k && (
|
|
|
|
<>
|
|
|
|
<>
|
|
|
|
<div className="hidden md:flex">
|
|
|
|
<div className="hidden md:flex">
|
|
|
|
<Badge badgeType="warning">
|
|
|
|
<Badge badgeType="warning">
|
|
|
@ -612,12 +650,15 @@ const TvDetails = ({ tv }: TvDetailsProps) => {
|
|
|
|
</Badge>
|
|
|
|
</Badge>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="flex md:hidden">
|
|
|
|
<div className="flex md:hidden">
|
|
|
|
<StatusBadgeMini status={MediaStatus.PENDING} />
|
|
|
|
<StatusBadgeMini
|
|
|
|
|
|
|
|
status={MediaStatus.PENDING}
|
|
|
|
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</>
|
|
|
|
</>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
{mSeason?.status ===
|
|
|
|
{mSeason?.status ===
|
|
|
|
MediaStatus.PARTIALLY_AVAILABLE && (
|
|
|
|
MediaStatus.PARTIALLY_AVAILABLE &&
|
|
|
|
|
|
|
|
showNon4k && (
|
|
|
|
<>
|
|
|
|
<>
|
|
|
|
<div className="hidden md:flex">
|
|
|
|
<div className="hidden md:flex">
|
|
|
|
<Badge badgeType="success">
|
|
|
|
<Badge badgeType="success">
|
|
|
@ -633,11 +674,14 @@ const TvDetails = ({ tv }: TvDetailsProps) => {
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</>
|
|
|
|
</>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
{mSeason?.status === MediaStatus.AVAILABLE && (
|
|
|
|
{mSeason?.status === MediaStatus.AVAILABLE &&
|
|
|
|
|
|
|
|
showNon4k && (
|
|
|
|
<>
|
|
|
|
<>
|
|
|
|
<div className="hidden md:flex">
|
|
|
|
<div className="hidden md:flex">
|
|
|
|
<Badge badgeType="success">
|
|
|
|
<Badge badgeType="success">
|
|
|
|
{intl.formatMessage(globalMessages.available)}
|
|
|
|
{intl.formatMessage(
|
|
|
|
|
|
|
|
globalMessages.available
|
|
|
|
|
|
|
|
)}
|
|
|
|
</Badge>
|
|
|
|
</Badge>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="flex md:hidden">
|
|
|
|
<div className="flex md:hidden">
|
|
|
|