From 52ae7cf60db08d23eebc758872f529b60cb120b7 Mon Sep 17 00:00:00 2001 From: Vladimir Buzalka Date: Mon, 19 Jan 2026 07:10:41 +0100 Subject: [PATCH] git --- 81 TorrentManipulation.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/81 TorrentManipulation.py b/81 TorrentManipulation.py index 9edf4ca..0b234fc 100644 --- a/81 TorrentManipulation.py +++ b/81 TorrentManipulation.py @@ -92,7 +92,7 @@ def is_valid_torrent(blob: bytes) -> bool: def sync_qb_to_db(): global stat_synced - torrents = qb.torrents_info() + torrents = qb.torrents_info(limit=1000) stat_synced = len(torrents) for t in torrents: @@ -134,7 +134,7 @@ def handle_completed_and_dead(): global stat_completed, stat_dead # Načteme info o torrentech - torrents = qb.torrents_info() + torrents = qb.torrents_info(limit=1000) for t in torrents: t_hash = t.hash @@ -209,7 +209,7 @@ def handle_completed_and_dead(): def count_active_downloads(): # Počítáme jen ty, co nejsou hotové (progress < 100%) - return sum(1 for t in qb.torrents_info() if float(t.progress) < 1.0) + return sum(1 for t in qb.torrents_info(limit=1000) if float(t.progress) < 1.0) def snapshot_active_downloading(): @@ -217,7 +217,7 @@ def snapshot_active_downloading(): Capture current actively downloading torrents (progress < 100%). """ active = [] - for t in qb.torrents_info(): + for t in qb.torrents_info(limit=1000): prog = float(t.progress) avail = float(getattr(t, "availability", 0)) # Zobrazíme i stav, abychom v mailu viděli, zda je queued nebo stalled