mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-23 05:26:37 +00:00
Use multiple threads for renaming
A single thread is much too slow for hundreds, or more, rename tasks. With at least two, one thread can be loading while another is being processed. The times when nothing is happening are reduced significantly.
This commit is contained in:
parent
f78fa44e0c
commit
986dc17013
@ -209,6 +209,9 @@ if MAX_RUN_TIME < 600:
|
|||||||
|
|
||||||
DOWNLOAD_MEDIA_DELAY = 60 + (MAX_RUN_TIME / 20)
|
DOWNLOAD_MEDIA_DELAY = 60 + (MAX_RUN_TIME / 20)
|
||||||
|
|
||||||
|
if RENAME_SOURCES or RENAME_ALL_SOURCES:
|
||||||
|
BACKGROUND_TASK_ASYNC_THREADS += 1
|
||||||
|
|
||||||
if BACKGROUND_TASK_ASYNC_THREADS > MAX_BACKGROUND_TASK_ASYNC_THREADS:
|
if BACKGROUND_TASK_ASYNC_THREADS > MAX_BACKGROUND_TASK_ASYNC_THREADS:
|
||||||
BACKGROUND_TASK_ASYNC_THREADS = MAX_BACKGROUND_TASK_ASYNC_THREADS
|
BACKGROUND_TASK_ASYNC_THREADS = MAX_BACKGROUND_TASK_ASYNC_THREADS
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user