Fix spaces

This commit is contained in:
Jeffrey Serio 2024-10-25 12:54:12 -05:00
parent 11c3fda10f
commit da006b5919
2 changed files with 3 additions and 3 deletions

View File

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

View File

@ -8,7 +8,7 @@ let new_head = (
( (
/home/jas/admin-scripts/list_torrents.py /home/jas/admin-scripts/list_torrents.py
| from ssv -m 1 | from ssv -m 2
| to html | to html
| str replace ($old_head) ($new_head) | str replace ($old_head) ($new_head)
| save -f -r /home/jas/public/html/torrents.html | save -f -r /home/jas/public/html/torrents.html