mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
New: Support Indexer Grab Redirects
This commit is contained in:
@@ -63,6 +63,7 @@ class IndexerIndexRow extends Component {
|
||||
name,
|
||||
baseUrl,
|
||||
enable,
|
||||
redirect,
|
||||
tags,
|
||||
protocol,
|
||||
privacy,
|
||||
@@ -114,6 +115,7 @@ class IndexerIndexRow extends Component {
|
||||
key={column.name}
|
||||
className={styles[column.name]}
|
||||
enabled={enable}
|
||||
redirect={redirect}
|
||||
status={status}
|
||||
longDateFormat={longDateFormat}
|
||||
timeFormat={timeFormat}
|
||||
@@ -258,6 +260,7 @@ IndexerIndexRow.propTypes = {
|
||||
priority: PropTypes.number.isRequired,
|
||||
name: PropTypes.string.isRequired,
|
||||
enable: PropTypes.bool.isRequired,
|
||||
redirect: PropTypes.bool.isRequired,
|
||||
status: PropTypes.object,
|
||||
capabilities: PropTypes.object.isRequired,
|
||||
added: PropTypes.string.isRequired,
|
||||
|
@@ -10,6 +10,7 @@ function IndexerStatusCell(props) {
|
||||
const {
|
||||
className,
|
||||
enabled,
|
||||
redirect,
|
||||
status,
|
||||
longDateFormat,
|
||||
timeFormat,
|
||||
@@ -17,6 +18,9 @@ function IndexerStatusCell(props) {
|
||||
...otherProps
|
||||
} = props;
|
||||
|
||||
const enableKind = redirect ? kinds.WARNING : kinds.SUCCESS;
|
||||
const enableTitle = redirect ? 'Indexer is Enabled, Redirect is Enabled' : 'Indexer is Enabled';
|
||||
|
||||
return (
|
||||
<Component
|
||||
className={className}
|
||||
@@ -25,9 +29,9 @@ function IndexerStatusCell(props) {
|
||||
{
|
||||
<Icon
|
||||
className={styles.statusIcon}
|
||||
kind={enabled ? kinds.SUCCESS : kinds.DEFAULT}
|
||||
kind={enabled ? enableKind : kinds.DEFAULT}
|
||||
name={enabled ? icons.CHECK : icons.BLACKLIST}
|
||||
title={enabled ? 'Indexer is Enabled' : 'Indexer is Disabled'}
|
||||
title={enabled ? enableTitle : 'Indexer is Disabled'}
|
||||
/>
|
||||
}
|
||||
{
|
||||
@@ -46,6 +50,7 @@ function IndexerStatusCell(props) {
|
||||
IndexerStatusCell.propTypes = {
|
||||
className: PropTypes.string.isRequired,
|
||||
enabled: PropTypes.bool.isRequired,
|
||||
redirect: PropTypes.bool.isRequired,
|
||||
status: PropTypes.object,
|
||||
longDateFormat: PropTypes.string.isRequired,
|
||||
timeFormat: PropTypes.string.isRequired,
|
||||
|
@@ -39,7 +39,9 @@ function EditIndexerModalContent(props) {
|
||||
implementationName,
|
||||
name,
|
||||
enable,
|
||||
redirect,
|
||||
supportsRss,
|
||||
supportsRedirect,
|
||||
fields,
|
||||
priority
|
||||
} = item;
|
||||
@@ -90,6 +92,19 @@ function EditIndexerModalContent(props) {
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>{translate('Redirect')}</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="redirect"
|
||||
helpText={'Redirect incoming download requests for indexer instead of Proxying using Prowlarr'}
|
||||
isDisabled={!supportsRedirect.value}
|
||||
{...redirect}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
{
|
||||
fields.map((field) => {
|
||||
return (
|
||||
|
Reference in New Issue
Block a user