mirror of
https://github.com/Laborratte5/linux-iso-seeder.git
synced 2025-12-30 17:08:17 +01:00
Update fetch_torrents.py
This commit is contained in:
parent
afb9ccc934
commit
4e39d8ffb2
1 changed files with 2 additions and 2 deletions
|
|
@ -162,12 +162,12 @@ def log_seed_ratios_via_http(rpc_url="http://localhost:9091/transmission/rpc", a
|
||||||
# sort by uploadRatio, highest first
|
# sort by uploadRatio, highest first
|
||||||
torrents_sorted = sorted(
|
torrents_sorted = sorted(
|
||||||
torrents,
|
torrents,
|
||||||
key=lambda t: t.get("uploadRatio") or 0,
|
key=lambda t: float(t["uploadRatio"] or 0.0),
|
||||||
reverse=True,
|
reverse=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
for t in torrents_sorted:
|
for t in torrents_sorted:
|
||||||
logging.info("[ratio] %s → %.3f", t["name"], t["uploadRatio"])
|
logging.info("[ratio] %-50s → %.3f", t["name"], float(t["uploadRatio"] or 0.0))
|
||||||
|
|
||||||
# Example: find all torrents for a distro, keep only the latest
|
# Example: find all torrents for a distro, keep only the latest
|
||||||
def cleanup_old_versions():
|
def cleanup_old_versions():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue