Files
YanLongChangAn 63ef32f01e refactor(services): 重构服务模块导入和文件重命名功能
- 移除 services/__init__.py 中的所有服务导入导出
- 将各个蓝图中的通配符导入改为具体服务模块导入
- 将 files_rename 函数重命名为 file_rename 并更新相关引用
- 更新前端 API 调用中的函数名映射
- 修复视频蓝图中的多余空行问题
- 移除种子蓝图中的未使用路由代码
2026-04-28 21:26:34 +08:00

35 lines
886 B
Python

from flask import Blueprint, jsonify
from app.services.video_service import VideoService
from app.services.torrent_service import TorrentService
bp = Blueprint("video", __name__)
@bp.route("/findDeduplication")
def video_find_deduplication():
video_object = VideoService(paths=[
"C:\\迅雷下载\\0_done",
"D:\\",
"E:\\",
"F:\\"
])
return jsonify({"code": 200, "message": video_object.find_deduplication()})
@bp.route('/deduplication')
def video_deduplication():
video_object = VideoService(paths=[
"C:\\迅雷下载\\0_done",
"D:\\",
"E:\\",
"F:\\"
])
return jsonify({"code": 200, "message": video_object.deduplication()})
@bp.route("/hasTorrent")
def video_has_torrent():
torrent_obj = TorrentService(["E:\\"])
return jsonify({"code": 200, "message": torrent_obj.has_torrent()})