Add ssv support

This commit is contained in:
Jeffrey Serio 2024-10-25 11:56:21 -05:00
parent e8428f1236
commit 912edc2500

View File

@ -61,6 +61,15 @@ def print_table():
print(tabulate(table, headers, tablefmt="grid"))
def print_ssv():
qb = Client("http://localhost:8080/")
qb.login()
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
if __name__ == "__main__":
args = docopt(__doc__) # type: ignore
print_table()
print_ssv()