remove actions in peer

This commit is contained in:
Mateusz Gruszczyński
2026-05-06 13:57:26 +02:00
parent c19ff17134
commit 21cbd5baa6
5 changed files with 3 additions and 64 deletions

View File

@@ -528,19 +528,6 @@ def torrent_peers(torrent_hash: str):
return ok({"peers": peers})
@bp.post("/torrents/<torrent_hash>/peers/action")
def torrent_peer_action(torrent_hash: str):
profile = preferences.active_profile()
if not profile:
return jsonify({"ok": False, "error": "No profile"}), 400
data = request.get_json(silent=True) or {}
try:
result = rtorrent.peer_action(profile, torrent_hash, int(data.get("peer_index")), str(data.get("action") or ""))
return ok({"result": result, "message": f"Peer {result['action']} via {result['method']}"})
except Exception as exc:
return jsonify({"ok": False, "error": str(exc)}), 400
@bp.get("/torrents/<torrent_hash>/trackers")
def torrent_trackers(torrent_hash: str):
profile = preferences.active_profile()