New: Import List option to search for missing episodes

Close #5882
This commit is contained in:
Mark McDowall 2023-10-06 12:27:21 -07:00
parent 44eb729ccc
commit db15a03c1e
6 changed files with 34 additions and 1 deletions

View File

@ -46,6 +46,7 @@ function EditImportListModalContent(props) {
implementationName, implementationName,
name, name,
enableAutomaticAdd, enableAutomaticAdd,
searchForMissingEpisodes,
minRefreshInterval, minRefreshInterval,
shouldMonitor, shouldMonitor,
rootFolderPath, rootFolderPath,
@ -113,6 +114,18 @@ function EditImportListModalContent(props) {
/> />
</FormGroup> </FormGroup>
<FormGroup>
<FormLabel>{translate('ImportListSearchForMissingEpisodes')}</FormLabel>
<FormInputGroup
type={inputTypes.CHECK}
name="searchForMissingEpisodes"
helpText={translate('EnableAutomaticAddHelpText')}
{...searchForMissingEpisodes}
onChange={onInputChange}
/>
</FormGroup>
<FormGroup> <FormGroup>
<FormLabel> <FormLabel>
{translate('Monitor')} {translate('Monitor')}

View File

@ -0,0 +1,14 @@
using FluentMigrator;
using NzbDrone.Core.Datastore.Migration.Framework;
namespace NzbDrone.Core.Datastore.Migration
{
[Migration(197)]
public class list_add_missing_search : NzbDroneMigrationBase
{
protected override void MainDbUpgrade()
{
Alter.Table("ImportLists").AddColumn("SearchForMissingEpisodes").AsBoolean().NotNullable().WithDefaultValue(true);
}
}
}

View File

@ -7,6 +7,7 @@ namespace NzbDrone.Core.ImportLists
public class ImportListDefinition : ProviderDefinition public class ImportListDefinition : ProviderDefinition
{ {
public bool EnableAutomaticAdd { get; set; } public bool EnableAutomaticAdd { get; set; }
public bool SearchForMissingEpisodes { get; set; }
public MonitorTypes ShouldMonitor { get; set; } public MonitorTypes ShouldMonitor { get; set; }
public int QualityProfileId { get; set; } public int QualityProfileId { get; set; }
public SeriesTypes SeriesType { get; set; } public SeriesTypes SeriesType { get; set; }

View File

@ -163,7 +163,7 @@ namespace NzbDrone.Core.ImportLists
Tags = importList.Tags, Tags = importList.Tags,
AddOptions = new AddSeriesOptions AddOptions = new AddSeriesOptions
{ {
SearchForMissingEpisodes = monitored, SearchForMissingEpisodes = importList.SearchForMissingEpisodes,
Monitor = importList.ShouldMonitor Monitor = importList.ShouldMonitor
} }
}); });

View File

@ -612,6 +612,8 @@
"ImportListExclusionsLoadError": "Unable to load Import List Exclusions", "ImportListExclusionsLoadError": "Unable to load Import List Exclusions",
"ImportListRootFolderMissingRootHealthCheckMessage": "Missing root folder for import list(s): {0}", "ImportListRootFolderMissingRootHealthCheckMessage": "Missing root folder for import list(s): {0}",
"ImportListRootFolderMultipleMissingRootsHealthCheckMessage": "Multiple root folders are missing for import lists: {0}", "ImportListRootFolderMultipleMissingRootsHealthCheckMessage": "Multiple root folders are missing for import lists: {0}",
"ImportListSearchForMissingEpisodes": "Search for Missing Episodes",
"ImportListSearchForMissingEpisodesHelpText": "After series is added to {appName} automatically search for missing episodes",
"ImportListSettings": "Import List Settings", "ImportListSettings": "Import List Settings",
"ImportListStatusAllUnavailableHealthCheckMessage": "All lists are unavailable due to failures", "ImportListStatusAllUnavailableHealthCheckMessage": "All lists are unavailable due to failures",
"ImportListStatusUnavailableHealthCheckMessage": "Lists unavailable due to failures: {0}", "ImportListStatusUnavailableHealthCheckMessage": "Lists unavailable due to failures: {0}",

View File

@ -7,6 +7,7 @@ namespace Sonarr.Api.V3.ImportLists
public class ImportListResource : ProviderResource<ImportListResource> public class ImportListResource : ProviderResource<ImportListResource>
{ {
public bool EnableAutomaticAdd { get; set; } public bool EnableAutomaticAdd { get; set; }
public bool SearchForMissingEpisodes { get; set; }
public MonitorTypes ShouldMonitor { get; set; } public MonitorTypes ShouldMonitor { get; set; }
public string RootFolderPath { get; set; } public string RootFolderPath { get; set; }
public int QualityProfileId { get; set; } public int QualityProfileId { get; set; }
@ -29,6 +30,7 @@ namespace Sonarr.Api.V3.ImportLists
var resource = base.ToResource(definition); var resource = base.ToResource(definition);
resource.EnableAutomaticAdd = definition.EnableAutomaticAdd; resource.EnableAutomaticAdd = definition.EnableAutomaticAdd;
resource.SearchForMissingEpisodes = definition.SearchForMissingEpisodes;
resource.ShouldMonitor = definition.ShouldMonitor; resource.ShouldMonitor = definition.ShouldMonitor;
resource.RootFolderPath = definition.RootFolderPath; resource.RootFolderPath = definition.RootFolderPath;
resource.QualityProfileId = definition.QualityProfileId; resource.QualityProfileId = definition.QualityProfileId;
@ -51,6 +53,7 @@ namespace Sonarr.Api.V3.ImportLists
var definition = base.ToModel(resource, existingDefinition); var definition = base.ToModel(resource, existingDefinition);
definition.EnableAutomaticAdd = resource.EnableAutomaticAdd; definition.EnableAutomaticAdd = resource.EnableAutomaticAdd;
definition.SearchForMissingEpisodes = resource.SearchForMissingEpisodes;
definition.ShouldMonitor = resource.ShouldMonitor; definition.ShouldMonitor = resource.ShouldMonitor;
definition.RootFolderPath = resource.RootFolderPath; definition.RootFolderPath = resource.RootFolderPath;
definition.QualityProfileId = resource.QualityProfileId; definition.QualityProfileId = resource.QualityProfileId;