mirror of
https://github.com/fergalmoran/Readarr.git
synced 2026-02-19 06:16:02 +00:00
New: Option to disable automatic search on import lists
This commit is contained in:
@@ -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 @@ namespace NzbDrone.Core.ImportLists
|
||||
{
|
||||
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 @@ namespace NzbDrone.Core.ImportLists
|
||||
Tags = importList.Tags,
|
||||
AddOptions = new AddAuthorOptions
|
||||
{
|
||||
SearchForMissingBooks = monitored,
|
||||
SearchForMissingBooks = importList.ShouldSearch,
|
||||
Monitored = monitored,
|
||||
Monitor = monitored ? MonitorTypes.All : MonitorTypes.None
|
||||
}
|
||||
@@ -292,7 +292,7 @@ namespace NzbDrone.Core.ImportLists
|
||||
Tags = importList.Tags,
|
||||
AddOptions = new AddAuthorOptions
|
||||
{
|
||||
SearchForMissingBooks = monitored,
|
||||
SearchForMissingBooks = importList.ShouldSearch,
|
||||
Monitored = monitored,
|
||||
Monitor = monitored ? MonitorTypes.All : MonitorTypes.None
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ namespace Readarr.Api.V1.ImportLists
|
||||
{
|
||||
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 @@ namespace Readarr.Api.V1.ImportLists
|
||||
|
||||
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 @@ namespace Readarr.Api.V1.ImportLists
|
||||
|
||||
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