|
|
@ -129,6 +129,7 @@ const RadarrModal: React.FC<RadarrModalProps> = ({
|
|
|
|
baseUrl: radarr?.baseUrl,
|
|
|
|
baseUrl: radarr?.baseUrl,
|
|
|
|
activeProfileId: radarr?.activeProfileId,
|
|
|
|
activeProfileId: radarr?.activeProfileId,
|
|
|
|
rootFolder: radarr?.activeDirectory,
|
|
|
|
rootFolder: radarr?.activeDirectory,
|
|
|
|
|
|
|
|
minimumAvailability: radarr?.minimumAvailability,
|
|
|
|
isDefault: radarr?.isDefault ?? false,
|
|
|
|
isDefault: radarr?.isDefault ?? false,
|
|
|
|
is4k: radarr?.is4k ?? false,
|
|
|
|
is4k: radarr?.is4k ?? false,
|
|
|
|
}}
|
|
|
|
}}
|
|
|
@ -150,7 +151,7 @@ const RadarrModal: React.FC<RadarrModalProps> = ({
|
|
|
|
activeProfileName: profileName,
|
|
|
|
activeProfileName: profileName,
|
|
|
|
activeDirectory: values.rootFolder,
|
|
|
|
activeDirectory: values.rootFolder,
|
|
|
|
is4k: values.is4k,
|
|
|
|
is4k: values.is4k,
|
|
|
|
minimumAvailability: 'In Cinema',
|
|
|
|
minimumAvailability: values.minimumAvailability,
|
|
|
|
isDefault: values.isDefault,
|
|
|
|
isDefault: values.isDefault,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
if (!radarr) {
|
|
|
|
if (!radarr) {
|
|
|
@ -206,13 +207,13 @@ const RadarrModal: React.FC<RadarrModalProps> = ({
|
|
|
|
okDisabled={!isValidated || isSubmitting || isTesting}
|
|
|
|
okDisabled={!isValidated || isSubmitting || isTesting}
|
|
|
|
onOk={() => handleSubmit()}
|
|
|
|
onOk={() => handleSubmit()}
|
|
|
|
title={
|
|
|
|
title={
|
|
|
|
!radarr ? 'Create New Radarr Instance' : 'Edit Radarr Instance'
|
|
|
|
!radarr ? 'Create New Radarr Server' : 'Edit Radarr Server'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<div className="mb-6">
|
|
|
|
<div className="mb-6">
|
|
|
|
<div className="sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-200 sm:pt-5">
|
|
|
|
<div className="sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-200 sm:pt-5">
|
|
|
|
<label
|
|
|
|
<label
|
|
|
|
htmlFor="port"
|
|
|
|
htmlFor="isDefault"
|
|
|
|
className="block text-sm font-medium leading-5 text-cool-gray-400 sm:mt-px sm:pt-2"
|
|
|
|
className="block text-sm font-medium leading-5 text-cool-gray-400 sm:mt-px sm:pt-2"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
Default Server
|
|
|
|
Default Server
|
|
|
@ -304,7 +305,7 @@ const RadarrModal: React.FC<RadarrModalProps> = ({
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="mt-6 sm:mt-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-200 sm:pt-5">
|
|
|
|
<div className="mt-6 sm:mt-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-200 sm:pt-5">
|
|
|
|
<label
|
|
|
|
<label
|
|
|
|
htmlFor="port"
|
|
|
|
htmlFor="ssl"
|
|
|
|
className="block text-sm font-medium leading-5 text-cool-gray-400 sm:mt-px sm:pt-2"
|
|
|
|
className="block text-sm font-medium leading-5 text-cool-gray-400 sm:mt-px sm:pt-2"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
SSL
|
|
|
|
SSL
|
|
|
@ -324,7 +325,7 @@ const RadarrModal: React.FC<RadarrModalProps> = ({
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="mt-6 sm:mt-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-800 sm:pt-5">
|
|
|
|
<div className="mt-6 sm:mt-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-800 sm:pt-5">
|
|
|
|
<label
|
|
|
|
<label
|
|
|
|
htmlFor="name"
|
|
|
|
htmlFor="apiKey"
|
|
|
|
className="block text-sm font-medium leading-5 text-cool-gray-400 sm:mt-px sm:pt-2"
|
|
|
|
className="block text-sm font-medium leading-5 text-cool-gray-400 sm:mt-px sm:pt-2"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
API Key
|
|
|
|
API Key
|
|
|
@ -350,7 +351,7 @@ const RadarrModal: React.FC<RadarrModalProps> = ({
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="mt-6 sm:mt-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-800 sm:pt-5">
|
|
|
|
<div className="mt-6 sm:mt-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-800 sm:pt-5">
|
|
|
|
<label
|
|
|
|
<label
|
|
|
|
htmlFor="name"
|
|
|
|
htmlFor="baseUrl"
|
|
|
|
className="block text-sm font-medium leading-5 text-cool-gray-400 sm:mt-px sm:pt-2"
|
|
|
|
className="block text-sm font-medium leading-5 text-cool-gray-400 sm:mt-px sm:pt-2"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
Base URL
|
|
|
|
Base URL
|
|
|
@ -361,7 +362,7 @@ const RadarrModal: React.FC<RadarrModalProps> = ({
|
|
|
|
id="baseUrl"
|
|
|
|
id="baseUrl"
|
|
|
|
name="baseUrl"
|
|
|
|
name="baseUrl"
|
|
|
|
type="input"
|
|
|
|
type="input"
|
|
|
|
placeholder="Example: /sonarr"
|
|
|
|
placeholder="Example: /radarr"
|
|
|
|
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
|
|
|
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
|
|
|
setIsValidated(false);
|
|
|
|
setIsValidated(false);
|
|
|
|
setFieldValue('baseUrl', e.target.value);
|
|
|
|
setFieldValue('baseUrl', e.target.value);
|
|
|
@ -376,7 +377,7 @@ const RadarrModal: React.FC<RadarrModalProps> = ({
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="mt-6 sm:mt-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-800 sm:pt-5">
|
|
|
|
<div className="mt-6 sm:mt-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-800 sm:pt-5">
|
|
|
|
<label
|
|
|
|
<label
|
|
|
|
htmlFor="name"
|
|
|
|
htmlFor="activeProfileId"
|
|
|
|
className="block text-sm font-medium leading-5 text-cool-gray-400 sm:mt-px sm:pt-2"
|
|
|
|
className="block text-sm font-medium leading-5 text-cool-gray-400 sm:mt-px sm:pt-2"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
Quality Profile
|
|
|
|
Quality Profile
|
|
|
@ -400,14 +401,16 @@ const RadarrModal: React.FC<RadarrModalProps> = ({
|
|
|
|
))}
|
|
|
|
))}
|
|
|
|
</Field>
|
|
|
|
</Field>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{errors.baseUrl && touched.baseUrl && (
|
|
|
|
{errors.activeProfileId && touched.activeProfileId && (
|
|
|
|
<div className="text-red-500 mt-2">{errors.baseUrl}</div>
|
|
|
|
<div className="text-red-500 mt-2">
|
|
|
|
|
|
|
|
{errors.activeProfileId}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="mt-6 sm:mt-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-800 sm:pt-5">
|
|
|
|
<div className="mt-6 sm:mt-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-800 sm:pt-5">
|
|
|
|
<label
|
|
|
|
<label
|
|
|
|
htmlFor="name"
|
|
|
|
htmlFor="rootFolder"
|
|
|
|
className="block text-sm font-medium leading-5 text-cool-gray-400 sm:mt-px sm:pt-2"
|
|
|
|
className="block text-sm font-medium leading-5 text-cool-gray-400 sm:mt-px sm:pt-2"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
Root Folder
|
|
|
|
Root Folder
|
|
|
@ -431,14 +434,44 @@ const RadarrModal: React.FC<RadarrModalProps> = ({
|
|
|
|
))}
|
|
|
|
))}
|
|
|
|
</Field>
|
|
|
|
</Field>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{errors.baseUrl && touched.baseUrl && (
|
|
|
|
{errors.rootFolder && touched.rootFolder && (
|
|
|
|
<div className="text-red-500 mt-2">{errors.baseUrl}</div>
|
|
|
|
<div className="text-red-500 mt-2">
|
|
|
|
|
|
|
|
{errors.rootFolder}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className="mt-6 sm:mt-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-800 sm:pt-5">
|
|
|
|
|
|
|
|
<label
|
|
|
|
|
|
|
|
htmlFor="minimumAvailability"
|
|
|
|
|
|
|
|
className="block text-sm font-medium leading-5 text-cool-gray-400 sm:mt-px sm:pt-2"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
Minimum Availability
|
|
|
|
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<div className="mt-1 sm:mt-0 sm:col-span-2">
|
|
|
|
|
|
|
|
<div className="max-w-lg flex rounded-md shadow-sm">
|
|
|
|
|
|
|
|
<Field
|
|
|
|
|
|
|
|
as="select"
|
|
|
|
|
|
|
|
id="minimumAvailability"
|
|
|
|
|
|
|
|
name="minimumAvailability"
|
|
|
|
|
|
|
|
className="mt-1 form-select block w-full pl-3 pr-10 py-2 text-base leading-6 bg-cool-gray-700 border-cool-gray-500 focus:outline-none focus:shadow-outline-blue focus:border-cool-gray-500 sm:text-sm sm:leading-5"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<option value="announced">Announced</option>
|
|
|
|
|
|
|
|
<option value="inCinemas">In Cinemas</option>
|
|
|
|
|
|
|
|
<option value="released">Released</option>
|
|
|
|
|
|
|
|
<option value="preDB">PreDB</option>
|
|
|
|
|
|
|
|
</Field>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{errors.rootFolder && touched.rootFolder && (
|
|
|
|
|
|
|
|
<div className="text-red-500 mt-2">
|
|
|
|
|
|
|
|
{errors.rootFolder}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="mt-6 sm:mt-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-200 sm:pt-5">
|
|
|
|
<div className="mt-6 sm:mt-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-200 sm:pt-5">
|
|
|
|
<label
|
|
|
|
<label
|
|
|
|
htmlFor="port"
|
|
|
|
htmlFor="is4k"
|
|
|
|
className="block text-sm font-medium leading-5 text-cool-gray-400 sm:mt-px sm:pt-2"
|
|
|
|
className="block text-sm font-medium leading-5 text-cool-gray-400 sm:mt-px sm:pt-2"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
Ultra HD Server
|
|
|
|
Ultra HD Server
|
|
|
|