2022-03-16 06:26:15 +00:00
|
|
|
import { FunctionComponent, useCallback } from "react";
|
2021-03-25 14:22:43 +00:00
|
|
|
import { InputGroup } from "react-bootstrap";
|
|
|
|
import {
|
|
|
|
Check,
|
|
|
|
Chips,
|
|
|
|
CollapseBox,
|
|
|
|
Group,
|
|
|
|
Input,
|
2022-03-16 06:26:15 +00:00
|
|
|
Layout,
|
2021-03-25 14:22:43 +00:00
|
|
|
Message,
|
2022-01-22 13:35:11 +00:00
|
|
|
PathMappingTable,
|
2021-03-25 14:22:43 +00:00
|
|
|
Slider,
|
|
|
|
Text,
|
|
|
|
URLTestButton,
|
|
|
|
} from "../components";
|
|
|
|
import { moviesEnabledKey } from "../keys";
|
|
|
|
|
2022-03-16 06:26:15 +00:00
|
|
|
const SettingsRadarrView: FunctionComponent = () => {
|
2021-03-25 14:22:43 +00:00
|
|
|
const baseUrlOverride = useCallback((settings: Settings) => {
|
|
|
|
return settings.radarr.base_url?.slice(1) ?? "";
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
return (
|
2022-03-16 06:26:15 +00:00
|
|
|
<Layout name="Radarr">
|
2021-03-25 14:22:43 +00:00
|
|
|
<CollapseBox>
|
|
|
|
<CollapseBox.Control>
|
|
|
|
<Group header="Use Radarr">
|
|
|
|
<Input>
|
|
|
|
<Check label="Enabled" settingKey={moviesEnabledKey}></Check>
|
|
|
|
</Input>
|
|
|
|
</Group>
|
|
|
|
</CollapseBox.Control>
|
|
|
|
<CollapseBox.Content indent={false}>
|
|
|
|
<Group header="Host">
|
|
|
|
<Input name="Address">
|
|
|
|
<Text settingKey="settings-radarr-ip"></Text>
|
|
|
|
<Message>Hostname or IPv4 Address</Message>
|
|
|
|
</Input>
|
|
|
|
<Input name="Port">
|
2022-03-09 04:04:00 +00:00
|
|
|
<Text
|
|
|
|
settingKey="settings-radarr-port"
|
|
|
|
numberWithArrows={true}
|
|
|
|
></Text>
|
2021-03-25 14:22:43 +00:00
|
|
|
</Input>
|
|
|
|
<Input name="Base URL">
|
|
|
|
<InputGroup>
|
|
|
|
<InputGroup.Prepend>
|
|
|
|
<InputGroup.Text>/</InputGroup.Text>
|
|
|
|
</InputGroup.Prepend>
|
|
|
|
<Text
|
|
|
|
settingKey="settings-radarr-base_url"
|
|
|
|
override={baseUrlOverride}
|
|
|
|
beforeStaged={(v) => "/" + v}
|
|
|
|
></Text>
|
|
|
|
</InputGroup>
|
|
|
|
</Input>
|
|
|
|
<Input name="API Key">
|
|
|
|
<Text settingKey="settings-radarr-apikey"></Text>
|
|
|
|
</Input>
|
|
|
|
<Input>
|
|
|
|
<Check label="SSL" settingKey="settings-radarr-ssl"></Check>
|
|
|
|
</Input>
|
|
|
|
<Input>
|
|
|
|
<URLTestButton category="radarr"></URLTestButton>
|
|
|
|
</Input>
|
|
|
|
</Group>
|
|
|
|
<Group header="Options">
|
|
|
|
<Input name="Minimum Score">
|
|
|
|
<Slider settingKey="settings-general-minimum_score_movie"></Slider>
|
|
|
|
</Input>
|
|
|
|
<Input name="Excluded Tags">
|
|
|
|
<Chips settingKey="settings-radarr-excluded_tags"></Chips>
|
|
|
|
<Message>
|
|
|
|
Movies with those tags (case sensitive) in Radarr will be
|
|
|
|
excluded from automatic download of subtitles.
|
|
|
|
</Message>
|
|
|
|
</Input>
|
|
|
|
<Input>
|
|
|
|
<Check
|
|
|
|
label="Download Only Monitored"
|
|
|
|
settingKey="settings-radarr-only_monitored"
|
|
|
|
></Check>
|
|
|
|
<Message>
|
|
|
|
Automatic download of subtitles will only happen for monitored
|
|
|
|
movies in Radarr.
|
|
|
|
</Message>
|
|
|
|
</Input>
|
2022-03-22 02:14:44 +00:00
|
|
|
<Input>
|
|
|
|
<Check
|
|
|
|
label="Defer searching of subtitles until scheduled task execution"
|
|
|
|
settingKey="settings-radarr-defer_search_signalr"
|
|
|
|
></Check>
|
|
|
|
<Message>
|
|
|
|
If enabled, this option will prevent Bazarr from searching
|
|
|
|
subtitles as soon as movies are imported.
|
|
|
|
</Message>
|
|
|
|
<Message>
|
|
|
|
Search can be triggered using this command: `curl -d
|
|
|
|
"radarr_moviefile_id=$radarr_moviefile_id" -H "x-api-key:
|
|
|
|
###############################" -X POST
|
|
|
|
http://localhost:6767/api/webhooks/radarr`
|
|
|
|
</Message>
|
|
|
|
</Input>
|
2021-03-25 14:22:43 +00:00
|
|
|
</Group>
|
|
|
|
<Group header="Path Mappings">
|
|
|
|
<PathMappingTable type="radarr"></PathMappingTable>
|
|
|
|
</Group>
|
|
|
|
</CollapseBox.Content>
|
|
|
|
</CollapseBox>
|
2022-03-16 06:26:15 +00:00
|
|
|
</Layout>
|
2021-03-25 14:22:43 +00:00
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default SettingsRadarrView;
|