Fix print_ssv()

This commit is contained in:
Jeffrey Serio 2024-10-25 12:39:36 -05:00
parent 912edc2500
commit 6efc4c19ae

View File

@ -67,7 +67,12 @@ def print_ssv():
sorted_torrents = sorted(qb.torrents(), key=lambda d: d["name"]) # type: ignore
print("Name Size Trackers Ratio Uploaded")
for torrent in sorted_torrents:
print(f"{torrent["name"]} {human_bytes(int(torrent["total_size"]))} {torrent["trackers_count"]} {torrent["ratio"]} {human_bytes(int(torrent["uploaded"]))}") # type: ignore
name = torrent["name"] # type: ignore
size = human_bytes(int(torrent["total_size"])) # type: ignore
trackers = torrent["trackers_count"] # type: ignore
ratio = torrent["ratio"] # type: ignore
uploaded = human_bytes(int(torrent["uploaded"])) # type: ignore
print(f"{name} {size} {trackers} {ratio} {uploaded}")
if __name__ == "__main__":