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()})