remove(magnet): 删除磁力链接相关功能模块
- 移除 magnet_bp 蓝图及其路由配置 - 删除 app/__init__.py 中的 magnet_bp 导入和注册 - 移除 app/services/magnet_service.py 服务文件 - 从 requirements.txt 中删除 libtorrent 依赖 - 保留 Flask-CORS 但移除其他无关依赖项位置调整
This commit is contained in:
+1
-2
@@ -2,7 +2,7 @@ from flask import Flask
|
|||||||
from flask_cors import CORS
|
from flask_cors import CORS
|
||||||
from .extensions import db, migrate
|
from .extensions import db, migrate
|
||||||
from .config import DevelopmentConfig, ProductionConfig, TestingConfig
|
from .config import DevelopmentConfig, ProductionConfig, TestingConfig
|
||||||
from .blueprints import torrent_bp, book_bp, music_bp, file_bp, video_bp, image_bp, asmr_bp, magnet_bp
|
from .blueprints import torrent_bp, book_bp, music_bp, file_bp, video_bp, image_bp, asmr_bp
|
||||||
|
|
||||||
|
|
||||||
def create_app(config_name="development"):
|
def create_app(config_name="development"):
|
||||||
@@ -28,6 +28,5 @@ def create_app(config_name="development"):
|
|||||||
app.register_blueprint(video_bp.bp, url_prefix='/api/video')
|
app.register_blueprint(video_bp.bp, url_prefix='/api/video')
|
||||||
app.register_blueprint(image_bp.bp, url_prefix='/api/image')
|
app.register_blueprint(image_bp.bp, url_prefix='/api/image')
|
||||||
app.register_blueprint(asmr_bp.bp, url_prefix='/api/asmr')
|
app.register_blueprint(asmr_bp.bp, url_prefix='/api/asmr')
|
||||||
app.register_blueprint(magnet_bp.bp, url_prefix='/api/magnet')
|
|
||||||
|
|
||||||
return app
|
return app
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
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()})
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import requests
|
|
||||||
|
|
||||||
|
|
||||||
class MagnetService:
|
|
||||||
def __init__(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def to_torrent(self):
|
|
||||||
pass
|
|
||||||
+1
-2
@@ -6,5 +6,4 @@ Flask
|
|||||||
Flask-Migrate
|
Flask-Migrate
|
||||||
Flask-SocketIO
|
Flask-SocketIO
|
||||||
Flask-SQLAlchemy
|
Flask-SQLAlchemy
|
||||||
Flask-CORS
|
Flask-CORS
|
||||||
libtorrent
|
|
||||||
Reference in New Issue
Block a user