This commit is contained in:
Ignacio Serantes
2026-03-24 09:14:57 +01:00
parent b87e34a1b8
commit 0349155fd2
3 changed files with 51 additions and 29 deletions

View File

@@ -64,7 +64,8 @@ class ThreadPoolManager:
)
self.pool.setMaxThreadCount(self.default_thread_count)
self.is_user_active = False
logger.info(f"ThreadPoolManager initialized with {self.default_thread_count} threads.")
logger.info(f"ThreadPoolManager initialized with "
f"{self.default_thread_count} threads.")
def get_pool(self):
"""Returns the managed QThreadPool instance."""
@@ -87,7 +88,8 @@ class ThreadPoolManager:
else:
# User is idle, restore to default thread count.
self.pool.setMaxThreadCount(self.default_thread_count)
logger.debug(f"User is idle, restoring thread pool to {self.default_thread_count}.")
logger.debug(f"User is idle, restoring thread pool to "
f"{self.default_thread_count}.")
def update_default_thread_count(self):
"""Updates the default thread count from application settings."""
@@ -1329,6 +1331,7 @@ class ImageScanner(QThread):
progress_percent = Signal(int)
finished_scan = Signal(int) # Total images found
more_files_available = Signal(int, int) # Last loaded index, remainder
def __init__(self, cache, paths, is_file_list=False, viewers=None,
thread_pool_manager=None):
# is_file_list is not used