mirror of
https://codeberg.org/hyperreal/admin-scripts
synced 2024-11-25 09:03:41 +01:00
use better check for completion
This commit is contained in:
parent
7d2c365c57
commit
13a4ac5a79
@ -55,7 +55,7 @@ if __name__ == "__main__":
|
||||
# get total_completed_bytes
|
||||
completed_torrent_sizes = []
|
||||
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
|
||||
|
||||
total_completed_bytes = sum(completed_torrent_sizes)
|
||||
|
Loading…
Reference in New Issue
Block a user