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