New: Series type and season folder options for import lists
Closes #3982
This commit is contained in:
parent
f9e045d14c
commit
25baf7bb45
|
@ -1,5 +1,6 @@
|
|||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import SeriesTypePopoverContent from 'AddSeries/SeriesTypePopoverContent';
|
||||
import SeriesMonitoringOptionsPopoverContent from 'AddSeries/SeriesMonitoringOptionsPopoverContent';
|
||||
import { icons, inputTypes, kinds, tooltipPositions } from 'Helpers/Props';
|
||||
import Icon from 'Components/Icon';
|
||||
|
@ -46,6 +47,8 @@ function EditImportListModalContent(props) {
|
|||
rootFolderPath,
|
||||
qualityProfileId,
|
||||
languageProfileId,
|
||||
seriesType,
|
||||
seasonFolder,
|
||||
tags,
|
||||
fields
|
||||
} = item;
|
||||
|
@ -138,7 +141,7 @@ function EditImportListModalContent(props) {
|
|||
<FormInputGroup
|
||||
type={inputTypes.QUALITY_PROFILE_SELECT}
|
||||
name="qualityProfileId"
|
||||
helpText={'Quality Profile list items should be added with'}
|
||||
helpText={'Quality Profile list items will be added with'}
|
||||
{...qualityProfileId}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
|
@ -150,19 +153,55 @@ function EditImportListModalContent(props) {
|
|||
<FormInputGroup
|
||||
type={inputTypes.LANGUAGE_PROFILE_SELECT}
|
||||
name="languageProfileId"
|
||||
helpText={'Language Profile list items should be added with'}
|
||||
helpText={'Language Profile list items will be added with'}
|
||||
{...languageProfileId}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>
|
||||
Series Type
|
||||
|
||||
<Popover
|
||||
anchor={
|
||||
<Icon
|
||||
className={styles.labelIcon}
|
||||
name={icons.INFO}
|
||||
/>
|
||||
}
|
||||
title="Series Types"
|
||||
body={<SeriesTypePopoverContent />}
|
||||
position={tooltipPositions.RIGHT}
|
||||
/>
|
||||
</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.SERIES_TYPE_SELECT}
|
||||
name="seriesType"
|
||||
onChange={onInputChange}
|
||||
{...seriesType}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>Season Folder</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="seasonFolder"
|
||||
onChange={onInputChange}
|
||||
{...seasonFolder}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>Sonarr Tags</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.TAG}
|
||||
name="tags"
|
||||
helpText="Add series from this list with these tags"
|
||||
helpText="Tags list items will be added with"
|
||||
{...tags}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
|
|
|
@ -109,6 +109,8 @@ export default {
|
|||
return selectProviderSchema(state, section, payload, (selectedSchema) => {
|
||||
selectedSchema.enableAutomaticAdd = true;
|
||||
selectedSchema.shouldMonitor = 'all';
|
||||
selectedSchema.seriesType = 'standard';
|
||||
selectedSchema.seasonFolder = true;
|
||||
|
||||
return selectedSchema;
|
||||
});
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
using FluentMigrator;
|
||||
using NzbDrone.Core.Datastore.Migration.Framework;
|
||||
|
||||
namespace NzbDrone.Core.Datastore.Migration
|
||||
{
|
||||
[Migration(144)]
|
||||
public class import_lists_series_type_and_season_folder : NzbDroneMigrationBase
|
||||
{
|
||||
protected override void MainDbUpgrade()
|
||||
{
|
||||
Alter.Table("ImportLists").AddColumn("SeriesType").AsInt32().WithDefaultValue(0);
|
||||
Alter.Table("ImportLists").AddColumn("SeasonFolder").AsBoolean().WithDefaultValue(true);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -9,6 +9,8 @@ namespace NzbDrone.Core.ImportLists
|
|||
public MonitorTypes ShouldMonitor { get; set; }
|
||||
public int QualityProfileId { get; set; }
|
||||
public int LanguageProfileId { get; set; }
|
||||
public SeriesTypes SeriesType { get; set; }
|
||||
public bool SeasonFolder { get; set; }
|
||||
public string RootFolderPath { get; set; }
|
||||
|
||||
public override bool Enable => EnableAutomaticAdd;
|
||||
|
|
|
@ -125,8 +125,9 @@ namespace NzbDrone.Core.ImportLists
|
|||
RootFolderPath = importList.RootFolderPath,
|
||||
QualityProfileId = importList.QualityProfileId,
|
||||
LanguageProfileId = importList.LanguageProfileId,
|
||||
SeriesType = importList.SeriesType,
|
||||
SeasonFolder = importList.SeasonFolder,
|
||||
Tags = importList.Tags,
|
||||
SeasonFolder = true,
|
||||
AddOptions = new AddSeriesOptions
|
||||
{
|
||||
SearchForMissingEpisodes = monitored,
|
||||
|
|
|
@ -10,6 +10,8 @@ namespace Sonarr.Api.V3.ImportLists
|
|||
public string RootFolderPath { get; set; }
|
||||
public int QualityProfileId { get; set; }
|
||||
public int LanguageProfileId { get; set; }
|
||||
public SeriesTypes SeriesType { get; set; }
|
||||
public bool SeasonFolder { get; set; }
|
||||
public ImportListType ListType { get; set; }
|
||||
public int ListOrder { get; set; }
|
||||
}
|
||||
|
@ -30,6 +32,8 @@ namespace Sonarr.Api.V3.ImportLists
|
|||
resource.RootFolderPath = definition.RootFolderPath;
|
||||
resource.QualityProfileId = definition.QualityProfileId;
|
||||
resource.LanguageProfileId = definition.LanguageProfileId;
|
||||
resource.SeriesType = definition.SeriesType;
|
||||
resource.SeasonFolder = definition.SeasonFolder;
|
||||
resource.ListType = definition.ListType;
|
||||
resource.ListOrder = (int) definition.ListType;
|
||||
|
||||
|
@ -50,6 +54,8 @@ namespace Sonarr.Api.V3.ImportLists
|
|||
definition.RootFolderPath = resource.RootFolderPath;
|
||||
definition.QualityProfileId = resource.QualityProfileId;
|
||||
definition.LanguageProfileId = resource.LanguageProfileId;
|
||||
definition.SeriesType = resource.SeriesType;
|
||||
definition.SeasonFolder = resource.SeasonFolder;
|
||||
definition.ListType = resource.ListType;
|
||||
|
||||
return definition;
|
||||
|
|
Loading…
Reference in New Issue