mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
New: Option to disable automatic search on import lists
(cherry picked from commit 9fc0a8d4d1109ee5a99e3776b4dcec6b3d458fbc) (cherry picked from commit 322212ceb041b5f541a0adfdc1fb03864f0c97c1)
This commit is contained in:
parent
a059b584db
commit
94499b4ae0
6 changed files with 43 additions and 4 deletions
|
@ -75,6 +75,7 @@ function EditImportListModalContent(props) {
|
||||||
name,
|
name,
|
||||||
enableAutomaticAdd,
|
enableAutomaticAdd,
|
||||||
shouldMonitor,
|
shouldMonitor,
|
||||||
|
shouldSearch,
|
||||||
rootFolderPath,
|
rootFolderPath,
|
||||||
monitorNewItems,
|
monitorNewItems,
|
||||||
qualityProfileId,
|
qualityProfileId,
|
||||||
|
@ -170,6 +171,18 @@ function EditImportListModalContent(props) {
|
||||||
onChange={onInputChange}
|
onChange={onInputChange}
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</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>
|
||||||
</FieldSet>
|
</FieldSet>
|
||||||
|
|
||||||
<FieldSet legend={translate('AddedArtistSettings')} >
|
<FieldSet legend={translate('AddedArtistSettings')} >
|
||||||
|
|
|
@ -55,7 +55,8 @@ class ImportList extends Component {
|
||||||
const {
|
const {
|
||||||
id,
|
id,
|
||||||
name,
|
name,
|
||||||
enableAutomaticAdd
|
enableAutomaticAdd,
|
||||||
|
shouldSearch
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -76,6 +77,12 @@ class ImportList extends Component {
|
||||||
</Label>
|
</Label>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
shouldSearch &&
|
||||||
|
<Label kind={kinds.SUCCESS}>
|
||||||
|
Automatic Search
|
||||||
|
</Label>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<EditImportListModalConnector
|
<EditImportListModalConnector
|
||||||
|
@ -103,6 +110,7 @@ ImportList.propTypes = {
|
||||||
id: PropTypes.number.isRequired,
|
id: PropTypes.number.isRequired,
|
||||||
name: PropTypes.string.isRequired,
|
name: PropTypes.string.isRequired,
|
||||||
enableAutomaticAdd: PropTypes.bool.isRequired,
|
enableAutomaticAdd: PropTypes.bool.isRequired,
|
||||||
|
shouldSearch: PropTypes.bool.isRequired,
|
||||||
onConfirmDeleteImportList: PropTypes.func.isRequired
|
onConfirmDeleteImportList: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ namespace Lidarr.Api.V1.ImportLists
|
||||||
{
|
{
|
||||||
public bool EnableAutomaticAdd { get; set; }
|
public bool EnableAutomaticAdd { get; set; }
|
||||||
public ImportListMonitorType ShouldMonitor { get; set; }
|
public ImportListMonitorType ShouldMonitor { get; set; }
|
||||||
|
public bool ShouldSearch { get; set; }
|
||||||
public string RootFolderPath { get; set; }
|
public string RootFolderPath { get; set; }
|
||||||
public NewItemMonitorTypes MonitorNewItems { get; set; }
|
public NewItemMonitorTypes MonitorNewItems { get; set; }
|
||||||
public int QualityProfileId { get; set; }
|
public int QualityProfileId { get; set; }
|
||||||
|
@ -28,6 +29,7 @@ namespace Lidarr.Api.V1.ImportLists
|
||||||
|
|
||||||
resource.EnableAutomaticAdd = definition.EnableAutomaticAdd;
|
resource.EnableAutomaticAdd = definition.EnableAutomaticAdd;
|
||||||
resource.ShouldMonitor = definition.ShouldMonitor;
|
resource.ShouldMonitor = definition.ShouldMonitor;
|
||||||
|
resource.ShouldSearch = definition.ShouldSearch;
|
||||||
resource.RootFolderPath = definition.RootFolderPath;
|
resource.RootFolderPath = definition.RootFolderPath;
|
||||||
resource.MonitorNewItems = definition.MonitorNewItems;
|
resource.MonitorNewItems = definition.MonitorNewItems;
|
||||||
resource.QualityProfileId = definition.ProfileId;
|
resource.QualityProfileId = definition.ProfileId;
|
||||||
|
@ -49,6 +51,7 @@ namespace Lidarr.Api.V1.ImportLists
|
||||||
|
|
||||||
definition.EnableAutomaticAdd = resource.EnableAutomaticAdd;
|
definition.EnableAutomaticAdd = resource.EnableAutomaticAdd;
|
||||||
definition.ShouldMonitor = resource.ShouldMonitor;
|
definition.ShouldMonitor = resource.ShouldMonitor;
|
||||||
|
definition.ShouldSearch = resource.ShouldSearch;
|
||||||
definition.RootFolderPath = resource.RootFolderPath;
|
definition.RootFolderPath = resource.RootFolderPath;
|
||||||
definition.MonitorNewItems = resource.MonitorNewItems;
|
definition.MonitorNewItems = resource.MonitorNewItems;
|
||||||
definition.ProfileId = resource.QualityProfileId;
|
definition.ProfileId = resource.QualityProfileId;
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
using FluentMigrator;
|
||||||
|
using NzbDrone.Core.Datastore.Migration.Framework;
|
||||||
|
|
||||||
|
namespace NzbDrone.Core.Datastore.Migration
|
||||||
|
{
|
||||||
|
[Migration(57)]
|
||||||
|
public class ImportListSearch : NzbDroneMigrationBase
|
||||||
|
{
|
||||||
|
protected override void MainDbUpgrade()
|
||||||
|
{
|
||||||
|
Alter.Table("ImportLists").AddColumn("ShouldSearch").AsInt32().WithDefaultValue(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -8,6 +8,7 @@ namespace NzbDrone.Core.ImportLists
|
||||||
public bool EnableAutomaticAdd { get; set; }
|
public bool EnableAutomaticAdd { get; set; }
|
||||||
public ImportListMonitorType ShouldMonitor { get; set; }
|
public ImportListMonitorType ShouldMonitor { get; set; }
|
||||||
public NewItemMonitorTypes MonitorNewItems { get; set; }
|
public NewItemMonitorTypes MonitorNewItems { get; set; }
|
||||||
|
public bool ShouldSearch { get; set; }
|
||||||
public int ProfileId { get; set; }
|
public int ProfileId { get; set; }
|
||||||
public int MetadataProfileId { get; set; }
|
public int MetadataProfileId { get; set; }
|
||||||
public string RootFolderPath { get; set; }
|
public string RootFolderPath { get; set; }
|
||||||
|
|
|
@ -221,7 +221,7 @@ namespace NzbDrone.Core.ImportLists
|
||||||
Tags = importList.Tags,
|
Tags = importList.Tags,
|
||||||
AddOptions = new AddArtistOptions
|
AddOptions = new AddArtistOptions
|
||||||
{
|
{
|
||||||
SearchForMissingAlbums = monitored,
|
SearchForMissingAlbums = importList.ShouldSearch,
|
||||||
Monitored = monitored,
|
Monitored = monitored,
|
||||||
Monitor = monitored ? MonitorTypes.All : MonitorTypes.None
|
Monitor = monitored ? MonitorTypes.All : MonitorTypes.None
|
||||||
}
|
}
|
||||||
|
@ -240,7 +240,7 @@ namespace NzbDrone.Core.ImportLists
|
||||||
Artist = toAddArtist,
|
Artist = toAddArtist,
|
||||||
AddOptions = new AddAlbumOptions
|
AddOptions = new AddAlbumOptions
|
||||||
{
|
{
|
||||||
SearchForNewAlbum = monitored
|
SearchForNewAlbum = importList.ShouldSearch
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -321,7 +321,7 @@ namespace NzbDrone.Core.ImportLists
|
||||||
Tags = importList.Tags,
|
Tags = importList.Tags,
|
||||||
AddOptions = new AddArtistOptions
|
AddOptions = new AddArtistOptions
|
||||||
{
|
{
|
||||||
SearchForMissingAlbums = monitored,
|
SearchForMissingAlbums = importList.ShouldSearch,
|
||||||
Monitored = monitored,
|
Monitored = monitored,
|
||||||
Monitor = monitored ? MonitorTypes.All : MonitorTypes.None
|
Monitor = monitored ? MonitorTypes.All : MonitorTypes.None
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue