From 13a4ac5a795d1810517d66845d734c96d1943ca6 Mon Sep 17 00:00:00 2001 From: Jeffrey Serio <23226432+hyperreal64@users.noreply.github.com> Date: Sat, 10 Aug 2024 18:44:21 -0500 Subject: [PATCH] use better check for completion --- bin/qbt_sum_size.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/qbt_sum_size.py b/bin/qbt_sum_size.py index fa6b943..2bb9ca1 100755 --- a/bin/qbt_sum_size.py +++ b/bin/qbt_sum_size.py @@ -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)