mirror of
https://github.com/Readarr/Readarr.git
synced 2026-01-31 09:11:11 -05:00
New: Option to disable automatic search on import lists
This commit is contained in:
@@ -71,6 +71,7 @@ function EditImportListModalContent(props) {
|
||||
name,
|
||||
enableAutomaticAdd,
|
||||
shouldMonitor,
|
||||
shouldSearch,
|
||||
rootFolderPath,
|
||||
qualityProfileId,
|
||||
metadataProfileId,
|
||||
@@ -148,6 +149,18 @@ function EditImportListModalContent(props) {
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>Search for New Items</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="shouldSearch"
|
||||
helpText={'Search indexers for newly added items. Use with caution for large lists.'}
|
||||
{...shouldSearch}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>Root Folder</FormLabel>
|
||||
|
||||
|
||||
@@ -54,7 +54,8 @@ class ImportList extends Component {
|
||||
const {
|
||||
id,
|
||||
name,
|
||||
enableAutomaticAdd
|
||||
enableAutomaticAdd,
|
||||
shouldSearch
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
@@ -75,6 +76,12 @@ class ImportList extends Component {
|
||||
</Label>
|
||||
}
|
||||
|
||||
{
|
||||
shouldSearch &&
|
||||
<Label kind={kinds.SUCCESS}>
|
||||
Automatic Search
|
||||
</Label>
|
||||
}
|
||||
</div>
|
||||
|
||||
<EditImportListModalConnector
|
||||
@@ -102,6 +109,7 @@ ImportList.propTypes = {
|
||||
id: PropTypes.number.isRequired,
|
||||
name: PropTypes.string.isRequired,
|
||||
enableAutomaticAdd: PropTypes.bool.isRequired,
|
||||
shouldSearch: PropTypes.bool.isRequired,
|
||||
onConfirmDeleteImportList: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
using FluentMigrator;
|
||||
using NzbDrone.Core.Datastore.Migration.Framework;
|
||||
|
||||
namespace NzbDrone.Core.Datastore.Migration
|
||||
{
|
||||
[Migration(2)]
|
||||
public class ImportListSearch : NzbDroneMigrationBase
|
||||
{
|
||||
protected override void MainDbUpgrade()
|
||||
{
|
||||
Alter.Table("ImportLists").AddColumn("ShouldSearch").AsInt32().WithDefaultValue(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ public class ImportListDefinition : ProviderDefinition
|
||||
{
|
||||
public bool EnableAutomaticAdd { get; set; }
|
||||
public ImportListMonitorType ShouldMonitor { get; set; }
|
||||
public bool ShouldSearch { get; set; }
|
||||
public int ProfileId { get; set; }
|
||||
public int MetadataProfileId { get; set; }
|
||||
public string RootFolderPath { get; set; }
|
||||
|
||||
@@ -224,7 +224,7 @@ private void ProcessAlbumReport(ImportListDefinition importList, ImportListItemI
|
||||
Tags = importList.Tags,
|
||||
AddOptions = new AddAuthorOptions
|
||||
{
|
||||
SearchForMissingBooks = monitored,
|
||||
SearchForMissingBooks = importList.ShouldSearch,
|
||||
Monitored = monitored,
|
||||
Monitor = monitored ? MonitorTypes.All : MonitorTypes.None
|
||||
}
|
||||
@@ -292,7 +292,7 @@ private void ProcessArtistReport(ImportListDefinition importList, ImportListItem
|
||||
Tags = importList.Tags,
|
||||
AddOptions = new AddAuthorOptions
|
||||
{
|
||||
SearchForMissingBooks = monitored,
|
||||
SearchForMissingBooks = importList.ShouldSearch,
|
||||
Monitored = monitored,
|
||||
Monitor = monitored ? MonitorTypes.All : MonitorTypes.None
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ public class ImportListResource : ProviderResource
|
||||
{
|
||||
public bool EnableAutomaticAdd { get; set; }
|
||||
public ImportListMonitorType ShouldMonitor { get; set; }
|
||||
public bool ShouldSearch { get; set; }
|
||||
public string RootFolderPath { get; set; }
|
||||
public int QualityProfileId { get; set; }
|
||||
public int MetadataProfileId { get; set; }
|
||||
@@ -26,6 +27,7 @@ public override ImportListResource ToResource(ImportListDefinition definition)
|
||||
|
||||
resource.EnableAutomaticAdd = definition.EnableAutomaticAdd;
|
||||
resource.ShouldMonitor = definition.ShouldMonitor;
|
||||
resource.ShouldSearch = definition.ShouldSearch;
|
||||
resource.RootFolderPath = definition.RootFolderPath;
|
||||
resource.QualityProfileId = definition.ProfileId;
|
||||
resource.MetadataProfileId = definition.MetadataProfileId;
|
||||
@@ -46,6 +48,7 @@ public override ImportListDefinition ToModel(ImportListResource resource)
|
||||
|
||||
definition.EnableAutomaticAdd = resource.EnableAutomaticAdd;
|
||||
definition.ShouldMonitor = resource.ShouldMonitor;
|
||||
definition.ShouldSearch = resource.ShouldSearch;
|
||||
definition.RootFolderPath = resource.RootFolderPath;
|
||||
definition.ProfileId = resource.QualityProfileId;
|
||||
definition.MetadataProfileId = resource.MetadataProfileId;
|
||||
|
||||
Reference in New Issue
Block a user