Make list options advanced settings, Set min list sync

pull/5416/head
Qstick 4 years ago
parent 082a0679d2
commit 17f8eb3aae

@ -11,6 +11,7 @@ import translate from 'Utilities/String/translate';
function ImportListOptions(props) {
const {
advancedSettings,
isFetching,
error,
settings,
@ -27,52 +28,59 @@ function ImportListOptions(props) {
];
return (
<FieldSet legend={translate('Options')}>
{
isFetching &&
<LoadingIndicator />
}
advancedSettings &&
<FieldSet legend={translate('Options')}>
{
isFetching &&
<LoadingIndicator />
}
{
!isFetching && error &&
<div>
{translate('UnableToLoadListOptions')}
</div>
}
{
!isFetching && error &&
<div>
{translate('UnableToLoadListOptions')}
</div>
}
{
hasSettings && !isFetching && !error &&
<Form>
<FormGroup>
<FormLabel>{translate('ListUpdateInterval')}</FormLabel>
{
hasSettings && !isFetching && !error &&
<Form>
<FormGroup
advancedSettings={advancedSettings}
isAdvanced={true}
>
<FormLabel>{translate('ListUpdateInterval')}</FormLabel>
<FormInputGroup
type={inputTypes.NUMBER}
name="importListSyncInterval"
min={0}
unit="minutes"
helpText={translate('ImportListSyncIntervalHelpText')}
onChange={onInputChange}
{...settings.importListSyncInterval}
/>
</FormGroup>
<FormInputGroup
type={inputTypes.NUMBER}
name="importListSyncInterval"
min={6}
unit="hours"
helpText={translate('ImportListSyncIntervalHelpText')}
onChange={onInputChange}
{...settings.importListSyncInterval}
/>
</FormGroup>
<FormGroup>
<FormLabel>{translate('CleanLibraryLevel')}</FormLabel>
<FormGroup
advancedSettings={advancedSettings}
isAdvanced={true}
>
<FormLabel>{translate('CleanLibraryLevel')}</FormLabel>
<FormInputGroup
type={inputTypes.SELECT}
name="listSyncLevel"
values={cleanLibraryLevelOptions}
helpText={translate('ListSyncLevelHelpText')}
helpTextWarning={settings.listSyncLevel.value === 'removeAndDelete' ? translate('ListSyncLevelHelpTextWarning') : undefined}
onChange={onInputChange}
{...settings.listSyncLevel}
/>
</FormGroup>
</Form>
}
</FieldSet>
<FormInputGroup
type={inputTypes.SELECT}
name="listSyncLevel"
values={cleanLibraryLevelOptions}
helpText={translate('ListSyncLevelHelpText')}
helpTextWarning={settings.listSyncLevel.value === 'removeAndDelete' ? translate('ListSyncLevelHelpTextWarning') : undefined}
onChange={onInputChange}
{...settings.listSyncLevel}
/>
</FormGroup>
</Form>
}
</FieldSet>
);
}

@ -120,7 +120,7 @@ namespace NzbDrone.Core.Configuration
public int ImportListSyncInterval
{
get { return GetValueInt("ImportListSyncInterval", 240); }
get { return GetValueInt("ImportListSyncInterval", 24); }
set { SetValue("ImportListSyncInterval", value); }
}

@ -147,19 +147,10 @@ namespace NzbDrone.Core.Jobs
private int GetImportListSyncInterval()
{
var interval = _configService.ImportListSyncInterval;
//Enforce 6 hour min on list sync
var interval = Math.Max(_configService.ImportListSyncInterval, 6);
if (interval > 0 && interval < 10)
{
return 10;
}
if (interval < 0)
{
return 0;
}
return interval;
return interval * 60;
}
public void Handle(CommandExecutedEvent message)

@ -391,7 +391,7 @@
"Importing": "Importing",
"ImportListStatusCheckAllClientMessage": "All lists are unavailable due to failures",
"ImportListStatusCheckSingleClientMessage": "Lists unavailable due to failures: {0}",
"ImportListSyncIntervalHelpText": "How often Radarr syncs with your lists.",
"ImportListSyncIntervalHelpText": "How often Radarr syncs with your lists. Minimum value of 6 hours",
"ImportMechanismHealthCheckMessage": "Enable Completed Download Handling",
"ImportMovies": "Import Movies",
"ImportRootPath": "Point Radarr to the folder containing all of your movies, not a specific one. e.g. {0} and not {1}",

Loading…
Cancel
Save