mirror of
https://codeberg.org/hyperreal/admin-scripts
synced 2024-11-25 09:03:41 +01:00
Sort by descending seed ratio
This commit is contained in:
parent
da006b5919
commit
6efeee8ca9
@ -48,7 +48,7 @@ def print_table():
|
|||||||
qb.login()
|
qb.login()
|
||||||
table = []
|
table = []
|
||||||
headers = ["Name", "Total Size", "Trackers Count", "Ratio", "Uploaded"]
|
headers = ["Name", "Total Size", "Trackers Count", "Ratio", "Uploaded"]
|
||||||
sorted_torrents = sorted(qb.torrents(), key=lambda d: d["name"]) # type: ignore
|
sorted_torrents = sorted(qb.torrents(), key=lambda d: d["ratio"], reverse=True) # type: ignore
|
||||||
for torrent in sorted_torrents:
|
for torrent in sorted_torrents:
|
||||||
row = []
|
row = []
|
||||||
row.append(torrent["name"]) # type: ignore
|
row.append(torrent["name"]) # type: ignore
|
||||||
@ -64,7 +64,7 @@ def print_table():
|
|||||||
def print_ssv():
|
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["ratio"], reverse=True) # 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
|
||||||
|
Loading…
Reference in New Issue
Block a user