mirror of
https://github.com/JefferyHcool/BiliNote.git
synced 2026-05-06 20:42:52 +08:00
feat(local): 添加本地视频处理功能
- 实现本地视频上传和处理功能 - 新增 LocalDownloader 类处理本地视频 - 更新前端界面支持本地视频选择 - 添加视频封面提取和保存功能 - 优化后端路由支持本地视频上传
This commit is contained in:
@@ -22,15 +22,18 @@ out_dir = os.getenv('OUT_DIR', './static/screenshots')
|
||||
|
||||
# 自动创建本地目录(static 和 static/screenshots)
|
||||
static_dir = "static"
|
||||
uploads_dir = "uploads"
|
||||
if not os.path.exists(static_dir):
|
||||
os.makedirs(static_dir)
|
||||
if not os.path.exists(uploads_dir):
|
||||
os.makedirs(uploads_dir)
|
||||
|
||||
if not os.path.exists(out_dir):
|
||||
os.makedirs(out_dir)
|
||||
|
||||
app = create_app()
|
||||
app.mount(static_path, StaticFiles(directory=static_dir), name="static")
|
||||
|
||||
app.mount("/uploads", StaticFiles(directory=uploads_dir), name="uploads")
|
||||
async def startup_event():
|
||||
register_handler()
|
||||
@app.on_event("startup")
|
||||
|
||||
Reference in New Issue
Block a user