fix: fix potential issue; update docs

This commit is contained in:
Peifan Li
2025-12-08 15:49:47 -05:00
parent 74875abc7c
commit 2cd620ad38
8 changed files with 64 additions and 25 deletions

View File

@@ -16,6 +16,7 @@
- `GET /api/download-status` - Get status of active downloads
- `GET /api/check-bilibili-parts` - Check if a Bilibili video has multiple parts
- `GET /api/check-bilibili-collection` - Check if a Bilibili URL is a collection/series
- `GET /api/check-video-download` - Check if a video has already been downloaded (by URL)
## Download Management
- `POST /api/downloads/cancel/:id` - Cancel a download
@@ -44,3 +45,7 @@
- `POST /api/settings/delete-legacy` - Delete legacy JSON data
- `POST /api/scan-files` - Scan for existing files
- `POST /api/cleanup-temp-files` - Cleanup temporary download files
- `GET /api/settings/password-enabled` - Check if password protection is enabled
- `POST /api/settings/upload-cookies` - Upload cookies.txt for yt-dlp
- `POST /api/settings/delete-cookies` - Delete cookies.txt
- `GET /api/settings/check-cookies` - Check if cookies.txt exists

View File

@@ -8,9 +8,11 @@ mytube/
│ │ ├── controllers/ # Route controllers
│ │ ├── db/ # Database migrations and setup
│ │ ├── routes/ # API routes
│ │ ├── scripts/ # Utility scripts
│ │ ├── services/ # Business logic services
│ │ ├── utils/ # Utility functions
│ │ ── server.ts # Main server file
│ │ ── server.ts # Main server file
│ │ └── version.ts # Version information
│ ├── uploads/ # Uploaded files directory
│ │ ├── videos/ # Downloaded videos
│ │ └── images/ # Downloaded thumbnails
@@ -22,11 +24,19 @@ mytube/
│ │ ├── contexts/ # React contexts
│ │ ├── pages/ # Page components
│ │ ├── utils/ # Utilities and locales
│ │ ── theme.ts # Theme configuration
│ │ ── App.tsx # Main application component
│ │ ├── main.tsx # Application entry point
│ │ ├── theme.ts # Theme configuration
│ │ ├── types.ts # TypeScript type definitions
│ │ └── version.ts # Version information
│ └── package.json # Frontend dependencies
├── build-and-push.sh # Docker build script
├── docker-compose.yml # Docker Compose configuration
├── DEPLOYMENT.md # Deployment guide
├── CONTRIBUTING.md # Contributing guidelines
├── EXAMPLES.md # Example usage and screenshots
├── RELEASING.md # Release process guide
├── SECURITY.md # Security policy
├── CODE_OF_CONDUCT.md # Code of conduct
└── package.json # Root package.json for running both apps
```

View File

@@ -16,6 +16,7 @@
- `GET /api/download-status` - 获取当前下载状态
- `GET /api/check-bilibili-parts` - 检查 Bilibili 视频是否包含多个分P
- `GET /api/check-bilibili-collection` - 检查 Bilibili URL 是否为合集/系列
- `GET /api/check-video-download` - 检查视频是否已下载 (通过 URL)
## 下载管理
- `POST /api/downloads/cancel/:id` - 取消下载
@@ -44,3 +45,7 @@
- `POST /api/settings/delete-legacy` - 删除旧的 JSON 数据
- `POST /api/scan-files` - 扫描现有文件
- `POST /api/cleanup-temp-files` - 清理临时下载文件
- `GET /api/settings/password-enabled` - 检查是否启用了密码保护
- `POST /api/settings/upload-cookies` - 上传 cookies.txt 以供 yt-dlp 使用
- `POST /api/settings/delete-cookies` - 删除 cookies.txt
- `GET /api/settings/check-cookies` - 检查 cookies.txt 是否存在

View File

@@ -8,9 +8,11 @@ mytube/
│ │ ├── controllers/ # 路由控制器
│ │ ├── db/ # 数据库迁移和设置
│ │ ├── routes/ # API 路由
│ │ ├── scripts/ # 实用脚本
│ │ ├── services/ # 业务逻辑服务
│ │ ├── utils/ # 工具函数
│ │ ── server.ts # 主服务器文件
│ │ ── server.ts # 主服务器文件
│ │ └── version.ts # 版本信息
│ ├── uploads/ # 上传文件目录
│ │ ├── videos/ # 下载的视频
│ │ └── images/ # 下载的缩略图
@@ -22,11 +24,19 @@ mytube/
│ │ ├── contexts/ # React 上下文
│ │ ├── pages/ # 页面组件
│ │ ├── utils/ # 工具和多语言文件
│ │ ── theme.ts # 主题配置
│ │ ── App.tsx # 主应用组件
│ │ ├── main.tsx # 应用入口点
│ │ ├── theme.ts # 主题配置
│ │ ├── types.ts # TypeScript 类型定义
│ │ └── version.ts # 版本信息
│ └── package.json # 前端依赖
├── build-and-push.sh # Docker 构建脚本
├── docker-compose.yml # Docker Compose 配置
├── DEPLOYMENT.md # 部署指南
├── CONTRIBUTING.md # 贡献指南
├── EXAMPLES.md # 示例用法和截图
├── RELEASING.md # 发布流程指南
├── SECURITY.md # 安全策略
├── CODE_OF_CONDUCT.md # 行为准则
└── package.json # 运行两个应用的根 package.json
```