Skip to content

Commit

Permalink
fix: do not display 'Request More' button if no requestable seasons (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCatLady committed Aug 30, 2022
1 parent 2950cf4 commit 23f93e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/components/RequestButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ const RequestButton = ({
}) &&
media &&
media.status !== MediaStatus.AVAILABLE &&
media.status !== MediaStatus.UNKNOWN &&
!isShowComplete
) {
buttons.push({
Expand Down Expand Up @@ -338,7 +337,6 @@ const RequestButton = ({
}) &&
media &&
media.status4k !== MediaStatus.AVAILABLE &&
media.status4k !== MediaStatus.UNKNOWN &&
!is4kShowComplete &&
settings.currentSettings.series4kEnabled
) {
Expand Down
8 changes: 6 additions & 2 deletions src/components/TvDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -239,15 +239,19 @@ const TvDetails = ({ tv }: TvDetailsProps) => {
seasonCount <=
(
data.mediaInfo?.seasons.filter(
(season) => season.status === MediaStatus.AVAILABLE
(season) =>
season.status === MediaStatus.AVAILABLE ||
season.status === MediaStatus.PARTIALLY_AVAILABLE
) ?? []
).length;

const is4kComplete =
seasonCount <=
(
data.mediaInfo?.seasons.filter(
(season) => season.status4k === MediaStatus.AVAILABLE
(season) =>
season.status4k === MediaStatus.AVAILABLE ||
season.status4k === MediaStatus.PARTIALLY_AVAILABLE
) ?? []
).length;

Expand Down

0 comments on commit 23f93e3

Please sign in to comment.