from flask import Blueprint, jsonify, request from app.services.torrent_service import TorrentService bp = Blueprint("torrent", __name__) @bp.route('/') def torrent_list(): torrent_object = TorrentService(["C:\\Users\\Localhost\\Desktop\\BT"]) return jsonify({"code": 200, "message": torrent_object.get_all()}) @bp.route('/deduplication') def torrent_deduplication(): torrent_object = TorrentService(["C:\\Users\\Localhost\\Desktop\\BT"]) return jsonify({"code": 200, "message": torrent_object.deduplication()}) @bp.route("/statistics") def torrent_statistics(): torrent_object = TorrentService(["C:\\Users\\Localhost\\Desktop\\BT"]) return jsonify({"code": 200, "message": torrent_object.statistics()})