use better check for completion

This commit is contained in:
Jeffrey Serio 2024-08-10 18:44:21 -05:00
parent 7d2c365c57
commit 13a4ac5a79

View File

@ -55,7 +55,7 @@ if __name__ == "__main__":
# get total_completed_bytes # get total_completed_bytes
completed_torrent_sizes = [] completed_torrent_sizes = []
for torrent in qb.torrents(): for torrent in qb.torrents():
if torrent["state"] == "queuedUP" or torrent["state"] == "pausedUP": # type: ignore if torrent["completion_on"] != 0: # type: ignore
completed_torrent_sizes.append(torrent["total_size"]) # type: ignore completed_torrent_sizes.append(torrent["total_size"]) # type: ignore
total_completed_bytes = sum(completed_torrent_sizes) total_completed_bytes = sum(completed_torrent_sizes)