max_downloads -> limit.downloads.concurrent

This commit is contained in:
auouymous 2022-12-08 14:49:33 -07:00
parent 04cb6583da
commit 84c35c76fd
3 changed files with 3 additions and 4 deletions

View File

@ -228,7 +228,6 @@ defaults = {
# The sooner this goes away, the better
gPodderSettings_LegacySupport = {
'max_downloads': 'limit.downloads.concurrent',
'episode_old_age': 'auto.cleanup.days',
'auto_remove_played_episodes': 'auto.cleanup.played',
'auto_remove_unfinished_episodes': 'auto.cleanup.unfinished',

View File

@ -451,7 +451,7 @@ class DownloadQueueManager(object):
def __continue_check_callback(self, worker_thread):
with self.worker_threads_access:
if len(self.worker_threads) > self._config.max_downloads and \
if len(self.worker_threads) > self._config.limit.downloads.concurrent and \
self._config.limit.downloads.enabled:
self.worker_threads.remove(worker_thread)
return False
@ -465,7 +465,7 @@ class DownloadQueueManager(object):
work_count = self.tasks.available_work_count()
if self._config.limit.downloads.enabled:
# always allow at least 1 download
spawn_limit = max(int(self._config.max_downloads), 1)
spawn_limit = max(int(self._config.limit.downloads.concurrent), 1)
else:
spawn_limit = self._config.limit.downloads.concurrent_max
running = len(self.worker_threads)

View File

@ -120,7 +120,7 @@ class UIConfig(config.Config):
It's not done automatically (always look for name + '_max') because it's
used only once. If it becomes commonplace, better make it automatic.
:param str name: configuration key (e.g. 'max_downloads' or 'limit.downloads.concurrent')
:param str name: configuration key (e.g. 'limit.downloads.concurrent')
:param Gtk.SpinButton spinbutton: button to bind to config
:param float forced_upper: forced upper limit on spinbutton.
Overrides value in .ui to be consistent with code