= ({
{intl.formatMessage(
userOverride
- ? messages.requiredquota
- : messages.requiredquotaUser,
+ ? messages.requiredquotaUser
+ : messages.requiredquota,
{
seasons: overLimit,
strong: function strong(msg) {
diff --git a/src/components/RequestModal/TvRequestModal.tsx b/src/components/RequestModal/TvRequestModal.tsx
index 1d6a9e640..8a521b81f 100644
--- a/src/components/RequestModal/TvRequestModal.tsx
+++ b/src/components/RequestModal/TvRequestModal.tsx
@@ -36,7 +36,8 @@ const messages = defineMessages({
requestfrom: "{username}'s request is pending approval.",
requestseasons:
'Request {seasonCount} {seasonCount, plural, one {Season} other {Seasons}}',
- requestall: 'Request All Seasons',
+ requestseasons4k:
+ 'Request {seasonCount} {seasonCount, plural, one {Season} other {Seasons}} in 4K',
alreadyrequested: 'Already Requested',
selectseason: 'Select Season(s)',
season: 'Season',
@@ -88,7 +89,10 @@ const TvRequestModal: React.FC = ({
});
const [tvdbId, setTvdbId] = useState(undefined);
const { data: quota } = useSWR(
- user ? `/api/v1/user/${requestOverrides?.user?.id ?? user.id}/quota` : null
+ user &&
+ (!requestOverrides?.user?.id || hasPermission(Permission.MANAGE_USERS))
+ ? `/api/v1/user/${requestOverrides?.user?.id ?? user.id}/quota`
+ : null
);
const currentlyRemaining =
@@ -387,12 +391,17 @@ const TvRequestModal: React.FC = ({
: getAllRequestedSeasons().length >= getAllSeasons().length
? intl.formatMessage(messages.alreadyrequested)
: !settings.currentSettings.partialRequestsEnabled
- ? intl.formatMessage(messages.requestall)
+ ? intl.formatMessage(
+ is4k ? globalMessages.request4k : globalMessages.request
+ )
: selectedSeasons.length === 0
? intl.formatMessage(messages.selectseason)
- : intl.formatMessage(messages.requestseasons, {
- seasonCount: selectedSeasons.length,
- })
+ : intl.formatMessage(
+ is4k ? messages.requestseasons4k : messages.requestseasons,
+ {
+ seasonCount: selectedSeasons.length,
+ }
+ )
}
okDisabled={
editRequest
@@ -440,7 +449,7 @@ const TvRequestModal: React.FC = ({
!(
quota?.tv.limit &&
!settings.currentSettings.partialRequestsEnabled &&
- unrequestedSeasons.length > (quota?.tv.limit ?? 0)
+ unrequestedSeasons.length > (quota?.tv.remaining ?? 0)
) &&
getAllRequestedSeasons().length < getAllSeasons().length &&
!editRequest && (
@@ -457,7 +466,7 @@ const TvRequestModal: React.FC = ({
quota={quota?.tv}
remaining={
!settings.currentSettings.partialRequestsEnabled &&
- unrequestedSeasons.length > (quota?.tv.limit ?? 0)
+ unrequestedSeasons.length > (quota?.tv.remaining ?? 0)
? 0
: currentlyRemaining
}
@@ -468,7 +477,7 @@ const TvRequestModal: React.FC = ({
}
overLimit={
!settings.currentSettings.partialRequestsEnabled &&
- unrequestedSeasons.length > (quota?.tv.limit ?? 0)
+ unrequestedSeasons.length > (quota?.tv.remaining ?? 0)
? unrequestedSeasons.length
: undefined
}
@@ -667,28 +676,26 @@ const TvRequestModal: React.FC = ({
{(hasPermission(Permission.REQUEST_ADVANCED) ||
hasPermission(Permission.MANAGE_REQUESTS)) && (
-
-
keyword.id === ANIME_KEYWORD_ID
- )}
- onChange={(overrides) => setRequestOverrides(overrides)}
- requestUser={editRequest?.requestedBy}
- defaultOverrides={
- editRequest
- ? {
- folder: editRequest.rootFolder,
- profile: editRequest.profileId,
- server: editRequest.serverId,
- language: editRequest.languageProfileId,
- tags: editRequest.tags,
- }
- : undefined
- }
- />
-
+ keyword.id === ANIME_KEYWORD_ID
+ )}
+ onChange={(overrides) => setRequestOverrides(overrides)}
+ requestUser={editRequest?.requestedBy}
+ defaultOverrides={
+ editRequest
+ ? {
+ folder: editRequest.rootFolder,
+ profile: editRequest.profileId,
+ server: editRequest.serverId,
+ language: editRequest.languageProfileId,
+ tags: editRequest.tags,
+ }
+ : undefined
+ }
+ />
)}
);
diff --git a/src/components/RequestModal/index.tsx b/src/components/RequestModal/index.tsx
index 7ba09bdef..dfbb715e6 100644
--- a/src/components/RequestModal/index.tsx
+++ b/src/components/RequestModal/index.tsx
@@ -1,13 +1,14 @@
import React from 'react';
-import MovieRequestModal from './MovieRequestModal';
import type { MediaStatus } from '../../../server/constants/media';
-import TvRequestModal from './TvRequestModal';
-import Transition from '../Transition';
import { MediaRequest } from '../../../server/entity/MediaRequest';
+import Transition from '../Transition';
+import CollectionRequestModal from './CollectionRequestModal';
+import MovieRequestModal from './MovieRequestModal';
+import TvRequestModal from './TvRequestModal';
interface RequestModalProps {
show: boolean;
- type: 'movie' | 'tv';
+ type: 'movie' | 'tv' | 'collection';
tmdbId: number;
is4k?: boolean;
editRequest?: MediaRequest;
@@ -26,29 +27,6 @@ const RequestModal: React.FC = ({
onUpdating,
onCancel,
}) => {
- if (type === 'tv') {
- return (
-
-
-
- );
- }
-
return (
= ({
leaveTo="opacity-0"
show={show}
>
-
+ {type === 'movie' ? (
+
+ ) : type === 'tv' ? (
+
+ ) : (
+
+ )}
);
};
diff --git a/src/i18n/locale/en.json b/src/i18n/locale/en.json
index 74bec8f87..10b9a897b 100644
--- a/src/i18n/locale/en.json
+++ b/src/i18n/locale/en.json
@@ -2,11 +2,8 @@
"components.AppDataWarning.dockerVolumeMissingDescription": "The {appDataPath}
volume mount was not configured properly. All data will be cleared when the container is stopped or restarted.",
"components.CollectionDetails.numberofmovies": "{count} Movies",
"components.CollectionDetails.overview": "Overview",
- "components.CollectionDetails.requestSuccess": "{title} requested successfully!",
"components.CollectionDetails.requestcollection": "Request Collection",
"components.CollectionDetails.requestcollection4k": "Request Collection in 4K",
- "components.CollectionDetails.requestswillbecreated": "The following titles will have requests created for them:",
- "components.CollectionDetails.requestswillbecreated4k": "The following titles will have 4K requests created for them:",
"components.Discover.DiscoverMovieGenre.genreMovies": "{genre} Movies",
"components.Discover.DiscoverMovieLanguage.languageMovies": "{language} Movies",
"components.Discover.DiscoverNetwork.networkSeries": "{network} Series",
@@ -336,15 +333,18 @@
"components.RequestModal.requestCancel": "Request for {title} canceled.",
"components.RequestModal.requestSuccess": "{title} requested successfully!",
"components.RequestModal.requestadmin": "This request will be approved automatically.",
- "components.RequestModal.requestall": "Request All Seasons",
"components.RequestModal.requestcancelled": "Request for {title} canceled.",
"components.RequestModal.requestedited": "Request for {title} edited successfully!",
"components.RequestModal.requesterror": "Something went wrong while submitting the request.",
"components.RequestModal.requestfrom": "{username}'s request is pending approval.",
+ "components.RequestModal.requestmovies": "Request {count} {count, plural, one {Movie} other {Movies}}",
+ "components.RequestModal.requestmovies4k": "Request {count} {count, plural, one {Movie} other {Movies}} in 4K",
"components.RequestModal.requestseasons": "Request {seasonCount} {seasonCount, plural, one {Season} other {Seasons}}",
+ "components.RequestModal.requestseasons4k": "Request {seasonCount} {seasonCount, plural, one {Season} other {Seasons}} in 4K",
"components.RequestModal.requesttitle": "Request {title}",
"components.RequestModal.season": "Season",
"components.RequestModal.seasonnumber": "Season {number}",
+ "components.RequestModal.selectmovies": "Select Movie(s)",
"components.RequestModal.selectseason": "Select Season(s)",
"components.ResetPassword.confirmpassword": "Confirm Password",
"components.ResetPassword.email": "Email Address",