mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-16 21:16:24 -04:00
Add: option to skip automatic redownload when removing from queue (#734)
* Add: option to skip automatic redownload when removing from queue * Add tests for RedownloadFailedDownloadService * Fix formatting * Make re-download dialog conditional
This commit is contained in:
@@ -21,7 +21,8 @@ class RemoveQueueItemModal extends Component {
|
||||
super(props, context);
|
||||
|
||||
this.state = {
|
||||
blacklist: false
|
||||
blacklist: false,
|
||||
skipredownload: false
|
||||
};
|
||||
}
|
||||
|
||||
@@ -32,15 +33,26 @@ class RemoveQueueItemModal extends Component {
|
||||
this.setState({ blacklist: value });
|
||||
}
|
||||
|
||||
onSkipReDownloadChange = ({ value }) => {
|
||||
this.setState({ skipredownload: value });
|
||||
}
|
||||
|
||||
onRemoveQueueItemConfirmed = () => {
|
||||
const blacklist = this.state.blacklist;
|
||||
const skipredownload = this.state.skipredownload;
|
||||
|
||||
this.setState({ blacklist: false });
|
||||
this.props.onRemovePress(blacklist);
|
||||
this.setState({
|
||||
blacklist: false,
|
||||
skipredownload: false
|
||||
});
|
||||
this.props.onRemovePress(blacklist, skipredownload);
|
||||
}
|
||||
|
||||
onModalClose = () => {
|
||||
this.setState({ blacklist: false });
|
||||
this.setState({
|
||||
blacklist: false,
|
||||
skipredownload: false
|
||||
});
|
||||
this.props.onModalClose();
|
||||
}
|
||||
|
||||
@@ -54,6 +66,7 @@ class RemoveQueueItemModal extends Component {
|
||||
} = this.props;
|
||||
|
||||
const blacklist = this.state.blacklist;
|
||||
const skipredownload = this.state.skipredownload;
|
||||
|
||||
return (
|
||||
<Modal
|
||||
@@ -79,11 +92,25 @@ class RemoveQueueItemModal extends Component {
|
||||
type={inputTypes.CHECK}
|
||||
name="blacklist"
|
||||
value={blacklist}
|
||||
helpText="Prevents Lidarr from automatically grabbing these files again"
|
||||
helpText="Prevents Lidarr from automatically grabbing this release again"
|
||||
onChange={this.onBlacklistChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
{
|
||||
blacklist &&
|
||||
<FormGroup>
|
||||
<FormLabel>Skip Redownload</FormLabel>
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="skipredownload"
|
||||
value={skipredownload}
|
||||
helpText="Prevents Lidarr from trying download an alternative release for this item"
|
||||
onChange={this.onSkipReDownloadChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
}
|
||||
|
||||
</ModalBody>
|
||||
|
||||
<ModalFooter>
|
||||
|
||||
Reference in New Issue
Block a user