max_downloads_enabled -> limit.downloads.enabled

This commit is contained in:
auouymous 2022-12-08 14:47:03 -07:00
parent 8eb60b8ccf
commit 04cb6583da
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_enabled': 'limit.downloads.enabled',
'max_downloads': 'limit.downloads.concurrent',
'episode_old_age': 'auto.cleanup.days',
'auto_remove_played_episodes': 'auto.cleanup.played',

View File

@ -452,7 +452,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 \
self._config.max_downloads_enabled:
self._config.limit.downloads.enabled:
self.worker_threads.remove(worker_thread)
return False
else:
@ -463,7 +463,7 @@ class DownloadQueueManager(object):
"""
with self.worker_threads_access:
work_count = self.tasks.available_work_count()
if self._config.max_downloads_enabled:
if self._config.limit.downloads.enabled:
# always allow at least 1 download
spawn_limit = max(int(self._config.max_downloads), 1)
else:

View File

@ -151,7 +151,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
self.config.connect_gtk_spinbutton('limit.downloads.concurrent', self.spinMaxDownloads,
self.config.limit.downloads.concurrent_max)
self.config.connect_gtk_togglebutton('max_downloads_enabled', self.cbMaxDownloads)
self.config.connect_gtk_togglebutton('limit.downloads.enabled', self.cbMaxDownloads)
self.config.connect_gtk_spinbutton('limit.bandwidth.kbps', self.spinLimitDownloads)
self.config.connect_gtk_togglebutton('limit.bandwidth.enabled', self.cbLimitDownloads)