git
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user