mirror of
https://github.com/Radarr/Radarr.git
synced 2024-10-05 15:47:20 +02:00
Fixed: No restart requirement for Refresh Monitored interval change
This commit is contained in:
parent
5824ba963b
commit
1caced614e
@ -65,10 +65,10 @@ function DownloadClientOptions(props) {
|
|||||||
<FormInputGroup
|
<FormInputGroup
|
||||||
type={inputTypes.NUMBER}
|
type={inputTypes.NUMBER}
|
||||||
name="checkForFinishedDownloadInterval"
|
name="checkForFinishedDownloadInterval"
|
||||||
min={0}
|
min={1}
|
||||||
max={120}
|
max={120}
|
||||||
unit="minutes"
|
unit="minutes"
|
||||||
helpText={translate('HelpText')}
|
helpText={translate('RefreshMonitoredIntervalHelpText')}
|
||||||
onChange={onInputChange}
|
onChange={onInputChange}
|
||||||
{...settings.checkForFinishedDownloadInterval}
|
{...settings.checkForFinishedDownloadInterval}
|
||||||
/>
|
/>
|
||||||
|
@ -116,7 +116,7 @@ function IndexerOptions(props) {
|
|||||||
min={0}
|
min={0}
|
||||||
max={120}
|
max={120}
|
||||||
unit="minutes"
|
unit="minutes"
|
||||||
helpText={translate('HelpText')}
|
helpText={translate('RssSyncHelpText')}
|
||||||
helpTextWarning={translate('RSSSyncIntervalHelpTextWarning')}
|
helpTextWarning={translate('RSSSyncIntervalHelpTextWarning')}
|
||||||
helpLink="https://wiki.servarr.com/radarr/faq#how-does-radarr-work"
|
helpLink="https://wiki.servarr.com/radarr/faq#how-does-radarr-work"
|
||||||
onChange={onInputChange}
|
onChange={onInputChange}
|
||||||
|
@ -121,7 +121,7 @@ public void Handle(ApplicationStartedEvent message)
|
|||||||
|
|
||||||
new ScheduledTask
|
new ScheduledTask
|
||||||
{
|
{
|
||||||
Interval = Math.Max(_configService.CheckForFinishedDownloadInterval, 1),
|
Interval = GetRefreshMonitoredInterval(),
|
||||||
TypeName = typeof(RefreshMonitoredDownloadsCommand).FullName,
|
TypeName = typeof(RefreshMonitoredDownloadsCommand).FullName,
|
||||||
Priority = CommandPriority.High
|
Priority = CommandPriority.High
|
||||||
}
|
}
|
||||||
@ -192,6 +192,18 @@ private int GetRssSyncInterval()
|
|||||||
return interval;
|
return interval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int GetRefreshMonitoredInterval()
|
||||||
|
{
|
||||||
|
var interval = _configService.CheckForFinishedDownloadInterval;
|
||||||
|
|
||||||
|
if (interval < 1)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return interval;
|
||||||
|
}
|
||||||
|
|
||||||
private int GetImportListSyncInterval()
|
private int GetImportListSyncInterval()
|
||||||
{
|
{
|
||||||
//Enforce 6 hour min on list sync
|
//Enforce 6 hour min on list sync
|
||||||
@ -228,13 +240,14 @@ public void HandleAsync(ConfigSavedEvent message)
|
|||||||
backup.Interval = GetBackupInterval();
|
backup.Interval = GetBackupInterval();
|
||||||
|
|
||||||
var refreshMonitoredDownloads = _scheduledTaskRepository.GetDefinition(typeof(RefreshMonitoredDownloadsCommand));
|
var refreshMonitoredDownloads = _scheduledTaskRepository.GetDefinition(typeof(RefreshMonitoredDownloadsCommand));
|
||||||
refreshMonitoredDownloads.Interval = _configService.CheckForFinishedDownloadInterval;
|
refreshMonitoredDownloads.Interval = GetRefreshMonitoredInterval();
|
||||||
|
|
||||||
_scheduledTaskRepository.UpdateMany(new List<ScheduledTask> { rss, importList, refreshMonitoredDownloads, backup });
|
_scheduledTaskRepository.UpdateMany(new List<ScheduledTask> { rss, importList, refreshMonitoredDownloads, backup });
|
||||||
|
|
||||||
_cache.Find(rss.TypeName).Interval = rss.Interval;
|
_cache.Find(rss.TypeName).Interval = rss.Interval;
|
||||||
_cache.Find(importList.TypeName).Interval = importList.Interval;
|
_cache.Find(importList.TypeName).Interval = importList.Interval;
|
||||||
_cache.Find(backup.TypeName).Interval = backup.Interval;
|
_cache.Find(backup.TypeName).Interval = backup.Interval;
|
||||||
|
_cache.Find(refreshMonitoredDownloads.TypeName).Interval = refreshMonitoredDownloads.Interval;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -364,7 +364,6 @@
|
|||||||
"HaveNotAddedMovies": "You haven't added any movies yet, do you want to import some or all of your movies first?",
|
"HaveNotAddedMovies": "You haven't added any movies yet, do you want to import some or all of your movies first?",
|
||||||
"Health": "Health",
|
"Health": "Health",
|
||||||
"HealthNoIssues": "No issues with your configuration",
|
"HealthNoIssues": "No issues with your configuration",
|
||||||
"HelpText": "Interval in minutes. Set to zero to disable (this will stop all automatic release grabbing)",
|
|
||||||
"HiddenClickToShow": "Hidden, click to show",
|
"HiddenClickToShow": "Hidden, click to show",
|
||||||
"HideAdvanced": "Hide Advanced",
|
"HideAdvanced": "Hide Advanced",
|
||||||
"History": "History",
|
"History": "History",
|
||||||
@ -646,8 +645,6 @@
|
|||||||
"OpenThisModal": "Open This Modal",
|
"OpenThisModal": "Open This Modal",
|
||||||
"Options": "Options",
|
"Options": "Options",
|
||||||
"Organize": "Organize",
|
"Organize": "Organize",
|
||||||
"OriginalTitle": "Original Title",
|
|
||||||
"OriginalLanguage": "Original Language",
|
|
||||||
"OrganizeAndRename": "Organize & Rename",
|
"OrganizeAndRename": "Organize & Rename",
|
||||||
"OrganizeConfirm": "Are you sure you want to organize all files in the {0} selected movie(s)?",
|
"OrganizeConfirm": "Are you sure you want to organize all files in the {0} selected movie(s)?",
|
||||||
"OrganizeModalAllPathsRelative": "All paths are relative to:",
|
"OrganizeModalAllPathsRelative": "All paths are relative to:",
|
||||||
@ -656,6 +653,8 @@
|
|||||||
"OrganizeModalSuccess": "Success! My work is done, no files to rename.",
|
"OrganizeModalSuccess": "Success! My work is done, no files to rename.",
|
||||||
"OrganizeSelectedMovies": "Organize Selected Movies",
|
"OrganizeSelectedMovies": "Organize Selected Movies",
|
||||||
"Original": "Original",
|
"Original": "Original",
|
||||||
|
"OriginalLanguage": "Original Language",
|
||||||
|
"OriginalTitle": "Original Title",
|
||||||
"OutputPath": "Output Path",
|
"OutputPath": "Output Path",
|
||||||
"Overview": "Overview",
|
"Overview": "Overview",
|
||||||
"OverviewOptions": "Overview Options",
|
"OverviewOptions": "Overview Options",
|
||||||
@ -750,6 +749,7 @@
|
|||||||
"RefreshAndScan": "Refresh & Scan",
|
"RefreshAndScan": "Refresh & Scan",
|
||||||
"RefreshInformationAndScanDisk": "Refresh information and scan disk",
|
"RefreshInformationAndScanDisk": "Refresh information and scan disk",
|
||||||
"RefreshLists": "Refresh Lists",
|
"RefreshLists": "Refresh Lists",
|
||||||
|
"RefreshMonitoredIntervalHelpText": "How often to refresh monitored downloads from download clients, minimum 1 minute",
|
||||||
"RefreshMovie": "Refresh movie",
|
"RefreshMovie": "Refresh movie",
|
||||||
"RegularExpressionsCanBeTested": "Regular expressions can be tested ",
|
"RegularExpressionsCanBeTested": "Regular expressions can be tested ",
|
||||||
"RejectionCount": "Rejection Count",
|
"RejectionCount": "Rejection Count",
|
||||||
@ -842,6 +842,7 @@
|
|||||||
"RSS": "RSS",
|
"RSS": "RSS",
|
||||||
"RSSIsNotSupportedWithThisIndexer": "RSS is not supported with this indexer",
|
"RSSIsNotSupportedWithThisIndexer": "RSS is not supported with this indexer",
|
||||||
"RSSSync": "RSS Sync",
|
"RSSSync": "RSS Sync",
|
||||||
|
"RssSyncHelpText": "Interval in minutes. Set to zero to disable (this will stop all automatic release grabbing)",
|
||||||
"RSSSyncInterval": "RSS Sync Interval",
|
"RSSSyncInterval": "RSS Sync Interval",
|
||||||
"RSSSyncIntervalHelpTextWarning": "This will apply to all indexers, please follow the rules set forth by them",
|
"RSSSyncIntervalHelpTextWarning": "This will apply to all indexers, please follow the rules set forth by them",
|
||||||
"Runtime": "Runtime",
|
"Runtime": "Runtime",
|
||||||
|
Loading…
Reference in New Issue
Block a user