refactor(services): 重构服务模块导入和文件重命名功能

- 移除 services/__init__.py 中的所有服务导入导出
- 将各个蓝图中的通配符导入改为具体服务模块导入
- 将 files_rename 函数重命名为 file_rename 并更新相关引用
- 更新前端 API 调用中的函数名映射
- 修复视频蓝图中的多余空行问题
- 移除种子蓝图中的未使用路由代码
This commit is contained in:
2026-04-28 21:26:34 +08:00
parent cf10846d8e
commit 63ef32f01e
14 changed files with 24 additions and 25 deletions
+8 -3
View File
@@ -1,6 +1,6 @@
from flask import Blueprint, jsonify
from app.services import TorrentService
from app.services.torrent_service import TorrentService
bp = Blueprint("torrent", __name__)
@@ -17,7 +17,12 @@ def torrent_statistics():
return jsonify({"code": 200, "message": torrent_object.statistics()})
@bp.route("/s/<name>")
@bp.route("/<name>")
def torrent_by_name(name):
torrent_object = TorrentService(["C:\\Users\\Localhost\\Desktop\\BT"])
return jsonify({"code": 200, "message": torrent_object.get_by_name(name)})
return jsonify({"code": 200, "message": torrent_object.get_by_name(name)})
# @bp.route("/extract/name")
# def torrent_extract_name():
# torrent_object = TorrentService([])
# return jsonify({"code": 200, "message": torrent_object.extract_name("AVSA-429.torrent")})