- 新增 asmr_bp 蓝图模块和 AsmrService 服务 - 新增 magnet_bp 蓝图模块和 MagnetService 服务 - 在应用初始化时注册新的蓝图模块 - 将 switch 语句替换为 if-elif 语句进行配置管理 - 在前端界面添加 ASMR 功能入口 - 增加 libtorrent 依赖包 - 修复字符串引号使用问题 - 增加文件重命名异常处理 - 扩展类型注解支持 Union 类型 - 增加请求超时时间到 30 秒 - 优化前端错误处理逻辑
11 lines
276 B
Python
11 lines
276 B
Python
from flask import Blueprint, Response, jsonify
|
|
|
|
from app.services.magnet_service import MagnetService
|
|
|
|
bp = Blueprint("magnet", __name__)
|
|
|
|
|
|
@bp.route("/")
|
|
def index():
|
|
magnet_object = MagnetService()
|
|
return jsonify({"code": 200, "message": magnet_object.to_torrent()}) |