git
This commit is contained in:
@@ -92,7 +92,7 @@ def is_valid_torrent(blob: bytes) -> bool:
|
|||||||
def sync_qb_to_db():
|
def sync_qb_to_db():
|
||||||
global stat_synced
|
global stat_synced
|
||||||
|
|
||||||
torrents = qb.torrents_info()
|
torrents = qb.torrents_info(limit=1000)
|
||||||
stat_synced = len(torrents)
|
stat_synced = len(torrents)
|
||||||
|
|
||||||
for t in torrents:
|
for t in torrents:
|
||||||
@@ -134,7 +134,7 @@ def handle_completed_and_dead():
|
|||||||
global stat_completed, stat_dead
|
global stat_completed, stat_dead
|
||||||
|
|
||||||
# Načteme info o torrentech
|
# Načteme info o torrentech
|
||||||
torrents = qb.torrents_info()
|
torrents = qb.torrents_info(limit=1000)
|
||||||
|
|
||||||
for t in torrents:
|
for t in torrents:
|
||||||
t_hash = t.hash
|
t_hash = t.hash
|
||||||
@@ -209,7 +209,7 @@ def handle_completed_and_dead():
|
|||||||
|
|
||||||
def count_active_downloads():
|
def count_active_downloads():
|
||||||
# Počítáme jen ty, co nejsou hotové (progress < 100%)
|
# 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():
|
def snapshot_active_downloading():
|
||||||
@@ -217,7 +217,7 @@ def snapshot_active_downloading():
|
|||||||
Capture current actively downloading torrents (progress < 100%).
|
Capture current actively downloading torrents (progress < 100%).
|
||||||
"""
|
"""
|
||||||
active = []
|
active = []
|
||||||
for t in qb.torrents_info():
|
for t in qb.torrents_info(limit=1000):
|
||||||
prog = float(t.progress)
|
prog = float(t.progress)
|
||||||
avail = float(getattr(t, "availability", 0))
|
avail = float(getattr(t, "availability", 0))
|
||||||
# Zobrazíme i stav, abychom v mailu viděli, zda je queued nebo stalled
|
# Zobrazíme i stav, abychom v mailu viděli, zda je queued nebo stalled
|
||||||
|
|||||||
Reference in New Issue
Block a user