mobile ux
This commit is contained in:
@@ -484,6 +484,22 @@ def torrents():
|
||||
})
|
||||
|
||||
|
||||
|
||||
@bp.get("/trackers/summary")
|
||||
def trackers_summary():
|
||||
profile = preferences.active_profile()
|
||||
if not profile:
|
||||
return ok({"summary": {"hashes": {}, "trackers": [], "errors": [], "scanned": 0}, "error": "No profile"})
|
||||
limit = min(2000, max(1, int(request.args.get("limit") or 1000)))
|
||||
hashes = request.args.getlist("hash")
|
||||
try:
|
||||
# Note: This endpoint powers only the sidebar tracker filter and never mutates torrents.
|
||||
if not hashes:
|
||||
hashes = [t.get("hash") for t in torrent_cache.snapshot(profile["id"]) if t.get("hash")]
|
||||
return ok({"summary": rtorrent.tracker_summary(profile, hashes, limit=limit)})
|
||||
except Exception as exc:
|
||||
return jsonify({"ok": False, "error": str(exc)}), 500
|
||||
|
||||
@bp.get("/torrent-stats")
|
||||
def torrent_stats_get():
|
||||
profile = preferences.active_profile()
|
||||
|
||||
Reference in New Issue
Block a user