From bcbe935a248ca2b7655853931fddb415c8dc33ac Mon Sep 17 00:00:00 2001 From: MoojMidge <56883549+MoojMidge@users.noreply.github.com> Date: Sat, 24 Aug 2024 18:34:48 +1000 Subject: [PATCH] Fix My Subscription thread loop timing out too early #882 --- resources/lib/youtube_plugin/youtube/client/youtube.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/lib/youtube_plugin/youtube/client/youtube.py b/resources/lib/youtube_plugin/youtube/client/youtube.py index 792087ae3..2c8a99606 100644 --- a/resources/lib/youtube_plugin/youtube/client/youtube.py +++ b/resources/lib/youtube_plugin/youtube/client/youtube.py @@ -1662,6 +1662,7 @@ def _threaded_fetch(kwargs, threads['pool_counts'][pool_id] -= 1 threads['pool_counts']['all'] -= 1 threads['current'].discard(current_thread) + threads['loop'].set() try: num_cores = cpu_count() or 1 @@ -1710,7 +1711,7 @@ def _threaded_fetch(kwargs, completed = [] iterator = iter(payloads) threads['loop'].set() - while threads['loop'].wait(1): + while threads['loop'].wait(): try: pool_id = next(iterator) except StopIteration: