diff --git a/wangpan-common/target/classes/com/wangpan/common/dal/dataobject/DriveDO.class b/wangpan-common/target/classes/com/wangpan/common/dal/dataobject/DriveDO.class
index 23f4241..e69fd50 100644
Binary files a/wangpan-common/target/classes/com/wangpan/common/dal/dataobject/DriveDO.class and b/wangpan-common/target/classes/com/wangpan/common/dal/dataobject/DriveDO.class differ
diff --git a/wangpan-common/target/classes/com/wangpan/common/dal/repository/DriveRepository.class b/wangpan-common/target/classes/com/wangpan/common/dal/repository/DriveRepository.class
index 468b0fc..e4eec7d 100644
Binary files a/wangpan-common/target/classes/com/wangpan/common/dal/repository/DriveRepository.class and b/wangpan-common/target/classes/com/wangpan/common/dal/repository/DriveRepository.class differ
diff --git a/wangpan-common/target/classes/com/wangpan/common/entity/Drive.class b/wangpan-common/target/classes/com/wangpan/common/entity/Drive.class
index 3a92936..c0e8edd 100644
Binary files a/wangpan-common/target/classes/com/wangpan/common/entity/Drive.class and b/wangpan-common/target/classes/com/wangpan/common/entity/Drive.class differ
diff --git a/wangpan-common/target/classes/com/wangpan/common/util/OpenListClient.class b/wangpan-common/target/classes/com/wangpan/common/util/OpenListClient.class
index 6d004b1..6f108e9 100644
Binary files a/wangpan-common/target/classes/com/wangpan/common/util/OpenListClient.class and b/wangpan-common/target/classes/com/wangpan/common/util/OpenListClient.class differ
diff --git a/wangpan-gateway/src/main/resources/META-INF/resources/api-doc.html b/wangpan-gateway/src/main/resources/META-INF/resources/api-doc.html
index 76cabd7..0bb6822 100644
--- a/wangpan-gateway/src/main/resources/META-INF/resources/api-doc.html
+++ b/wangpan-gateway/src/main/resources/META-INF/resources/api-doc.html
@@ -300,6 +300,7 @@
网盘服务
Icon服务
TMDB服务
+ OpenList集成
状态码
@@ -339,6 +340,17 @@
→
TMDB:8083
+
+
前端
+
→
+
Gateway
+
→
+
Drive:8082
+
→
+
OpenList:13000
+
→
+
各网盘
+
@@ -350,6 +362,8 @@
| /api/users/** | user-service | 用户管理 |
| /api/profile/** | user-service | 个人资料 |
| /api/drive/** | drive-service | 网盘管理 |
+ | /api/drive/**/sync-files | drive-service | OpenList 文件同步 |
+ | /api/drive/**/play-url | drive-service | OpenList 播放链接 |
| /api/icon/** | drive-service | Icon管理 |
| /api/movies/** | tmdb-service | 电影管理 |
| /api/tmdb/**, /api/tmdb-scraper/** | tmdb-service | TMDB刮削 |
@@ -3480,6 +3494,361 @@
+
+
+
+
OpenList 多网盘聚合服务
+ wangpan-drive-service : 8082 · 依赖 OpenList 服务 (http://ldfun.asia:13000)
+
+
+
+
功能说明
+
+ OpenList 集成模块将 OpenList 作为多网盘聚合后端,支持 80+ 种网盘服务(阿里云盘、百度网盘、UC网盘、OneDrive 等)。
+ Java 服务负责业务逻辑(用户、权限、TMDB 刮削),OpenList 负责文件操作(上传、下载、预览)。
+
+
+
+
前端
+
→
+
Gateway:8888
+
→
+
Drive:8082
+
→
+
OpenList:13000
+
→
+
各网盘
+
+
+
+
+
+
前置配置
+
+ 1. 在 OpenList 管理后台 (http://ldfun.asia:13000/@manage) 添加网盘存储
+ 2. 记录存储的 挂载路径(如 /uc)和 存储 ID(通过 API 获取)
+ 3. 在 application.yml 中配置 OpenList 服务地址和账号密码
+ 4. 创建网盘时传入 openlistStorageId 和 openlistMountPath 关联 OpenList 存储
+
+
+
+
+
+
+
+
+
请求头
+
Authorization: Bearer <token>
+Content-Type: application/json
+
+
+
请求体
+
{
+ "name": "UC网盘电影库",
+ "description": "UC网盘存储",
+ "openlistStorageId": "1",
+ "openlistMountPath": "/uc"
+}
+
+
+
字段说明
+
+ | 字段 | 类型 | 必填 | 说明 |
+ | name | String | 是 | 网盘名称 |
+ | description | String | 否 | 网盘描述 |
+ | openlistStorageId | String | 否 | OpenList 存储 ID(不传则仅记录元数据) |
+ | openlistMountPath | String | 否 | OpenList 挂载路径(如 "/uc") |
+
+
+
+
成功响应示例
+
{
+ "code": 200,
+ "message": "创建成功",
+ "data": {
+ "id": 1,
+ "name": "UC网盘电影库",
+ "description": "UC网盘存储",
+ "openlistStorageId": "1",
+ "openlistMountPath": "/uc",
+ "folderCount": 0,
+ "fileCount": 0,
+ "totalSize": 0,
+ "status": "active",
+ "createTime": "2026-06-26T15:00:00",
+ "updateTime": "2026-06-26T15:00:00"
+ }
+}
+
+
+
失败响应示例
+
{
+ "code": 400,
+ "message": "创建网盘失败:网盘名称不能为空",
+ "data": null
+}
+
+
+
+
+
+
+
+
+
+
请求头
+
Authorization: Bearer <token>
+
+
+
路径参数
+
+ | 参数 | 类型 | 说明 |
+ | driveId | Long | 网盘 ID |
+ | folderId | Long | 文件夹 ID(0 表示根目录) |
+
+
+
+
功能说明
+
+ 调用 OpenList API 获取指定路径下的文件列表,自动创建数据库中缺失的电影记录。
+ 已存在的文件不会重复创建。同步后文件可进行 TMDB 刮削。
+
+
+
+
成功响应示例
+
{
+ "code": 200,
+ "message": "同步成功",
+ "data": {
+ "syncCount": 5,
+ "totalFiles": 10
+ }
+}
+
+
+
响应字段说明
+
+ | 字段 | 说明 |
+ | syncCount | 本次新增的电影记录数量 |
+ | totalFiles | OpenList 中该路径下的文件总数 |
+
+
+
+
失败响应示例
+
{
+ "code": 400,
+ "message": "同步失败:网盘未关联 OpenList 存储",
+ "data": null
+}
+
+
+
+
+
+
+
+
+
+
请求头
+
Authorization: Bearer <token>
+
+
+
路径参数
+
+ | 参数 | 类型 | 说明 |
+ | driveId | Long | 网盘 ID |
+ | movieId | Long | 电影 ID |
+
+
+
+
功能说明
+
+ 调用 OpenList API 获取文件的真实下载地址,返回的 URL 可直接用于视频播放器播放。
+ 仅支持 storageType 为 openlist 的电影记录。
+
+
+
+
成功响应示例
+
{
+ "code": 200,
+ "message": "获取成功",
+ "data": {
+ "playUrl": "https://uc网盘真实下载地址/xxx.mp4",
+ "fileName": "阿凡达.mp4",
+ "fileSize": 1073741824
+ }
+}
+
+
+
响应字段说明
+
+ | 字段 | 说明 |
+ | playUrl | 真实播放/下载地址,可直接用于视频播放器 |
+ | fileName | 文件名 |
+ | fileSize | 文件大小(字节) |
+
+
+
+
失败响应示例
+
{
+ "code": 400,
+ "message": "获取失败:该电影不是 OpenList 管理的文件",
+ "data": null
+}
+
+
+
+
+
+
+
+
+
+
请求头
+
Authorization: Bearer <token>
+
+
+
成功响应示例
+
{
+ "code": 200,
+ "data": [
+ {
+ "id": 1,
+ "name": "UC网盘电影库",
+ "openlistStorageId": "1",
+ "openlistMountPath": "/uc",
+ "folderCount": 2,
+ "fileCount": 10,
+ "totalSize": 10737418240,
+ "status": "active"
+ }
+ ]
+}
+
+
+
新增字段说明
+
+ | 字段 | 说明 |
+ | openlistStorageId | 关联的 OpenList 存储 ID(null 表示未关联) |
+ | openlistMountPath | OpenList 挂载路径(如 "/uc") |
+
+
+
+
+
+
+
+
+
+
+
请求头
+
Authorization: Bearer <token>
+
+
+
路径参数
+
+ | 参数 | 类型 | 说明 |
+ | driveId | Long | 网盘 ID |
+ | folderId | Long | 文件夹 ID(0 表示根目录) |
+
+
+
+
成功响应示例
+
{
+ "code": 200,
+ "data": {
+ "list": [
+ {
+ "id": 1,
+ "title": "阿凡达.mp4",
+ "openlistFilePath": "/uc/阿凡达.mp4",
+ "storageType": "openlist",
+ "fileSize": 1073741824,
+ "mimeType": "video/mp4"
+ }
+ ],
+ "total": 10,
+ "page": 1,
+ "pageSize": 20
+ }
+}
+
+
+
新增字段说明
+
+ | 字段 | 说明 |
+ | openlistFilePath | OpenList 文件路径(如 "/uc/阿凡达.mp4") |
+ | storageType | 存储类型:metadata(仅元数据)/ openlist(OpenList 管理) |
+ | fileSize | 文件大小(字节) |
+
+
+
+
+
+
+
+
前端调用示例
+
+
创建网盘
+
const response = await fetch('/api/drive', {
+ method: 'POST',
+ headers: {
+ 'Authorization': `Bearer ${token}`,
+ 'Content-Type': 'application/json'
+ },
+ body: JSON.stringify({
+ name: 'UC网盘电影库',
+ openlistStorageId: '1',
+ openlistMountPath: '/uc'
+ })
+});
+
+
+
同步文件
+
const response = await fetch(`/api/drive/${driveId}/folders/${folderId}/sync-files`, {
+ method: 'POST',
+ headers: { 'Authorization': `Bearer ${token}` }
+});
+const data = await response.json();
+console.log(`同步了 ${data.data.syncCount} 个文件`);
+
+
+
播放视频
+
const response = await fetch(`/api/drive/${driveId}/movies/${movieId}/play-url`, {
+ headers: { 'Authorization': `Bearer ${token}` }
+});
+const data = await response.json();
+videoPlayer.src = data.data.playUrl; // 直接设置视频源
+videoPlayer.play();
+
+
+
+
diff --git a/wangpan-gateway/target/classes/META-INF/resources/api-doc.html b/wangpan-gateway/target/classes/META-INF/resources/api-doc.html
index 76cabd7..0bb6822 100644
--- a/wangpan-gateway/target/classes/META-INF/resources/api-doc.html
+++ b/wangpan-gateway/target/classes/META-INF/resources/api-doc.html
@@ -300,6 +300,7 @@
网盘服务
Icon服务
TMDB服务
+
OpenList集成
状态码
@@ -339,6 +340,17 @@
→
TMDB:8083
+
+
前端
+
→
+
Gateway
+
→
+
Drive:8082
+
→
+
OpenList:13000
+
→
+
各网盘
+
@@ -350,6 +362,8 @@
| /api/users/** | user-service | 用户管理 |
| /api/profile/** | user-service | 个人资料 |
| /api/drive/** | drive-service | 网盘管理 |
+ | /api/drive/**/sync-files | drive-service | OpenList 文件同步 |
+ | /api/drive/**/play-url | drive-service | OpenList 播放链接 |
| /api/icon/** | drive-service | Icon管理 |
| /api/movies/** | tmdb-service | 电影管理 |
| /api/tmdb/**, /api/tmdb-scraper/** | tmdb-service | TMDB刮削 |
@@ -3480,6 +3494,361 @@
+
+
+
+
OpenList 多网盘聚合服务
+ wangpan-drive-service : 8082 · 依赖 OpenList 服务 (http://ldfun.asia:13000)
+
+
+
+
功能说明
+
+ OpenList 集成模块将 OpenList 作为多网盘聚合后端,支持 80+ 种网盘服务(阿里云盘、百度网盘、UC网盘、OneDrive 等)。
+ Java 服务负责业务逻辑(用户、权限、TMDB 刮削),OpenList 负责文件操作(上传、下载、预览)。
+
+
+
+
前端
+
→
+
Gateway:8888
+
→
+
Drive:8082
+
→
+
OpenList:13000
+
→
+
各网盘
+
+
+
+
+
+
前置配置
+
+ 1. 在 OpenList 管理后台 (http://ldfun.asia:13000/@manage) 添加网盘存储
+ 2. 记录存储的 挂载路径(如 /uc)和 存储 ID(通过 API 获取)
+ 3. 在 application.yml 中配置 OpenList 服务地址和账号密码
+ 4. 创建网盘时传入 openlistStorageId 和 openlistMountPath 关联 OpenList 存储
+
+
+
+
+
+
+
+
+
请求头
+
Authorization: Bearer <token>
+Content-Type: application/json
+
+
+
请求体
+
{
+ "name": "UC网盘电影库",
+ "description": "UC网盘存储",
+ "openlistStorageId": "1",
+ "openlistMountPath": "/uc"
+}
+
+
+
字段说明
+
+ | 字段 | 类型 | 必填 | 说明 |
+ | name | String | 是 | 网盘名称 |
+ | description | String | 否 | 网盘描述 |
+ | openlistStorageId | String | 否 | OpenList 存储 ID(不传则仅记录元数据) |
+ | openlistMountPath | String | 否 | OpenList 挂载路径(如 "/uc") |
+
+
+
+
成功响应示例
+
{
+ "code": 200,
+ "message": "创建成功",
+ "data": {
+ "id": 1,
+ "name": "UC网盘电影库",
+ "description": "UC网盘存储",
+ "openlistStorageId": "1",
+ "openlistMountPath": "/uc",
+ "folderCount": 0,
+ "fileCount": 0,
+ "totalSize": 0,
+ "status": "active",
+ "createTime": "2026-06-26T15:00:00",
+ "updateTime": "2026-06-26T15:00:00"
+ }
+}
+
+
+
失败响应示例
+
{
+ "code": 400,
+ "message": "创建网盘失败:网盘名称不能为空",
+ "data": null
+}
+
+
+
+
+
+
+
+
+
+
请求头
+
Authorization: Bearer <token>
+
+
+
路径参数
+
+ | 参数 | 类型 | 说明 |
+ | driveId | Long | 网盘 ID |
+ | folderId | Long | 文件夹 ID(0 表示根目录) |
+
+
+
+
功能说明
+
+ 调用 OpenList API 获取指定路径下的文件列表,自动创建数据库中缺失的电影记录。
+ 已存在的文件不会重复创建。同步后文件可进行 TMDB 刮削。
+
+
+
+
成功响应示例
+
{
+ "code": 200,
+ "message": "同步成功",
+ "data": {
+ "syncCount": 5,
+ "totalFiles": 10
+ }
+}
+
+
+
响应字段说明
+
+ | 字段 | 说明 |
+ | syncCount | 本次新增的电影记录数量 |
+ | totalFiles | OpenList 中该路径下的文件总数 |
+
+
+
+
失败响应示例
+
{
+ "code": 400,
+ "message": "同步失败:网盘未关联 OpenList 存储",
+ "data": null
+}
+
+
+
+
+
+
+
+
+
+
请求头
+
Authorization: Bearer <token>
+
+
+
路径参数
+
+ | 参数 | 类型 | 说明 |
+ | driveId | Long | 网盘 ID |
+ | movieId | Long | 电影 ID |
+
+
+
+
功能说明
+
+ 调用 OpenList API 获取文件的真实下载地址,返回的 URL 可直接用于视频播放器播放。
+ 仅支持 storageType 为 openlist 的电影记录。
+
+
+
+
成功响应示例
+
{
+ "code": 200,
+ "message": "获取成功",
+ "data": {
+ "playUrl": "https://uc网盘真实下载地址/xxx.mp4",
+ "fileName": "阿凡达.mp4",
+ "fileSize": 1073741824
+ }
+}
+
+
+
响应字段说明
+
+ | 字段 | 说明 |
+ | playUrl | 真实播放/下载地址,可直接用于视频播放器 |
+ | fileName | 文件名 |
+ | fileSize | 文件大小(字节) |
+
+
+
+
失败响应示例
+
{
+ "code": 400,
+ "message": "获取失败:该电影不是 OpenList 管理的文件",
+ "data": null
+}
+
+
+
+
+
+
+
+
+
+
请求头
+
Authorization: Bearer <token>
+
+
+
成功响应示例
+
{
+ "code": 200,
+ "data": [
+ {
+ "id": 1,
+ "name": "UC网盘电影库",
+ "openlistStorageId": "1",
+ "openlistMountPath": "/uc",
+ "folderCount": 2,
+ "fileCount": 10,
+ "totalSize": 10737418240,
+ "status": "active"
+ }
+ ]
+}
+
+
+
新增字段说明
+
+ | 字段 | 说明 |
+ | openlistStorageId | 关联的 OpenList 存储 ID(null 表示未关联) |
+ | openlistMountPath | OpenList 挂载路径(如 "/uc") |
+
+
+
+
+
+
+
+
+
+
+
请求头
+
Authorization: Bearer <token>
+
+
+
路径参数
+
+ | 参数 | 类型 | 说明 |
+ | driveId | Long | 网盘 ID |
+ | folderId | Long | 文件夹 ID(0 表示根目录) |
+
+
+
+
成功响应示例
+
{
+ "code": 200,
+ "data": {
+ "list": [
+ {
+ "id": 1,
+ "title": "阿凡达.mp4",
+ "openlistFilePath": "/uc/阿凡达.mp4",
+ "storageType": "openlist",
+ "fileSize": 1073741824,
+ "mimeType": "video/mp4"
+ }
+ ],
+ "total": 10,
+ "page": 1,
+ "pageSize": 20
+ }
+}
+
+
+
新增字段说明
+
+ | 字段 | 说明 |
+ | openlistFilePath | OpenList 文件路径(如 "/uc/阿凡达.mp4") |
+ | storageType | 存储类型:metadata(仅元数据)/ openlist(OpenList 管理) |
+ | fileSize | 文件大小(字节) |
+
+
+
+
+
+
+
+
前端调用示例
+
+
创建网盘
+
const response = await fetch('/api/drive', {
+ method: 'POST',
+ headers: {
+ 'Authorization': `Bearer ${token}`,
+ 'Content-Type': 'application/json'
+ },
+ body: JSON.stringify({
+ name: 'UC网盘电影库',
+ openlistStorageId: '1',
+ openlistMountPath: '/uc'
+ })
+});
+
+
+
同步文件
+
const response = await fetch(`/api/drive/${driveId}/folders/${folderId}/sync-files`, {
+ method: 'POST',
+ headers: { 'Authorization': `Bearer ${token}` }
+});
+const data = await response.json();
+console.log(`同步了 ${data.data.syncCount} 个文件`);
+
+
+
播放视频
+
const response = await fetch(`/api/drive/${driveId}/movies/${movieId}/play-url`, {
+ headers: { 'Authorization': `Bearer ${token}` }
+});
+const data = await response.json();
+videoPlayer.src = data.data.playUrl; // 直接设置视频源
+videoPlayer.play();
+
+
+
+