From dbf98c781d8f9748eee8ad656c34b4fd95e15bfe Mon Sep 17 00:00:00 2001 From: jianzhichu Date: Fri, 13 Mar 2026 19:12:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=B2=E7=9F=A5=E9=97=AE=E9=A2=98=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controllers/VideoController.cs | 48 -- Program.cs | 1 + Properties/PublishProfiles/docker.pubxml | 2 +- Properties/PublishProfiles/docker.pubxml.user | 2 +- README.md | 6 +- app/src/pages/workplace/RecordTable.vue | 42 +- dy.net.csproj | 2 +- dy.net.csproj.user | 2 +- extension/ServiceExtension.cs | 40 +- job/DouYinCollectSyncJob.cs | 2 +- job/DouyinBasicSyncJob.cs | 39 +- model/dto/DouyinVideoPageRequestDto.cs | 3 + repository/DouyinVideoRepository.cs | 1 + service/DouyinCommonService.cs | 19 + service/DouyinHttpClientService.cs | 756 ++++++------------ utils/NfoFileGenerator.cs | 2 +- 16 files changed, 372 insertions(+), 595 deletions(-) diff --git a/Controllers/VideoController.cs b/Controllers/VideoController.cs index 6e90087..2e20d5f 100644 --- a/Controllers/VideoController.cs +++ b/Controllers/VideoController.cs @@ -73,54 +73,6 @@ namespace dy.net.Controllers } } - //private IActionResult PlayViedo(DouyinVideo viedo) - //{ - - // // 1. 拼接完整物理路径(配置路径 + 文件名) - // string videoFullPath = viedo.VideoSavePath; - - // // 2. 验证文件是否存在 - // if (!System.IO.File.Exists(videoFullPath)) - // { - // return ApiResult.Fail($"视频文件不存在:{videoFullPath}"); - // } - - // // 3. 获取文件信息(大小、类型) - // var fileInfo = new FileInfo(videoFullPath); - // long fileSize = fileInfo.Length; - // string contentType = GetContentType(videoFullPath); // 自动识别视频 MIME 类型 - - // // 4. 处理分片请求(前端视频标签自动发起,支持断点续传) - // if (Request.Headers.ContainsKey("Range") && long.TryParse(Request.Headers.Range.ToString().Split('=')[1].Split('-')[0], out long start)) - // { - // // 分片起始位置(前端请求的起始字节) - // long end = Math.Min(start + 1024 * 1024 * 2, fileSize - 1); // 每片 2MB(可调整) - // long chunkSize = end - start + 1; - - // // 5. 设置分片响应头 - // Response.StatusCode = StatusCodes.Status206PartialContent; - // Response.Headers.Add("Content-Range", $"bytes {start}-{end}/{fileSize}"); - // Response.Headers.Add("Accept-Ranges", "bytes"); - // Response.Headers.Add("Content-Length", chunkSize.ToString()); - - // // 6. 读取分片并返回流 - // var stream = new FileStream( - // videoFullPath, - // FileMode.Open, - // FileAccess.Read, - // FileShare.Read, - // bufferSize: 4096, - // useAsync: true); - - // stream.Seek(start, SeekOrigin.Begin); - // return new FileStreamResult(stream, contentType); - // } - // else - // { - // // 完整文件请求(兼容旧浏览器) - // return PhysicalFile(videoFullPath, contentType, enableRangeProcessing: true); - // } - //} /// /// 抖音视频播放接口(优化版) diff --git a/Program.cs b/Program.cs index b910c37..bb6b735 100644 --- a/Program.cs +++ b/Program.cs @@ -219,6 +219,7 @@ namespace dy.net //commonService.UpdateAllCookieSyncedToZero(); await commonService.UpdateFollowedSavePathAsync(); + await commonService.UpdateImageVideoSavePath(); // 初始化Cookie var cookieService = services.GetRequiredService(); diff --git a/Properties/PublishProfiles/docker.pubxml b/Properties/PublishProfiles/docker.pubxml index 069cf66..df33978 100644 --- a/Properties/PublishProfiles/docker.pubxml +++ b/Properties/PublishProfiles/docker.pubxml @@ -17,6 +17,6 @@ false - + \ No newline at end of file diff --git a/Properties/PublishProfiles/docker.pubxml.user b/Properties/PublishProfiles/docker.pubxml.user index c73e591..d37dfc4 100644 --- a/Properties/PublishProfiles/docker.pubxml.user +++ b/Properties/PublishProfiles/docker.pubxml.user @@ -3,7 +3,7 @@ <_PublishTargetUrl>E:\code\dysync\bin\Release\net6.0\publish\ - True|2026-02-25T14:29:25.1875055Z||;True|2026-02-25T22:28:53.3053713+08:00||;True|2026-02-12T19:27:23.6648031+08:00||;True|2026-02-12T19:25:10.7424743+08:00||;True|2026-02-12T17:33:31.2163848+08:00||;True|2026-02-12T17:16:08.2015031+08:00||;False|2026-02-12T17:16:02.9041381+08:00||;True|2026-02-12T17:12:44.8082909+08:00||;True|2026-02-12T17:04:22.1666828+08:00||;True|2026-02-12T17:03:04.2760582+08:00||;True|2026-02-12T16:52:01.7403172+08:00||;True|2026-02-12T16:49:57.7070533+08:00||;False|2026-02-12T16:49:53.4063422+08:00||;True|2026-02-12T16:43:13.2040344+08:00||;False|2026-02-12T16:42:58.3321319+08:00||;True|2026-02-12T16:29:28.6386479+08:00||;True|2026-02-12T16:19:46.9195592+08:00||;True|2026-02-12T14:32:25.3192428+08:00||;True|2026-02-12T12:18:02.1864306+08:00||;True|2026-02-11T20:39:23.8084775+08:00||;True|2026-02-11T20:37:06.6507806+08:00||;True|2026-02-11T20:04:19.1839991+08:00||;True|2026-02-10T21:59:37.6685615+08:00||;True|2026-02-10T15:43:23.5038986+08:00||;True|2026-02-10T14:42:48.6214001+08:00||;True|2026-02-06T23:15:19.0037070+08:00||;True|2026-02-06T22:52:30.1006808+08:00||;True|2026-02-06T22:49:02.0056235+08:00||;True|2026-02-06T22:45:30.6355735+08:00||;False|2026-02-06T22:45:25.7210123+08:00||;True|2026-02-06T22:38:37.6994272+08:00||;True|2026-02-06T22:14:47.8146805+08:00||;True|2026-02-03T22:34:12.3588819+08:00||;True|2026-02-03T22:20:08.9945012+08:00||;True|2026-02-03T21:06:17.7655312+08:00||;True|2026-02-02T23:24:09.9134119+08:00||;True|2026-02-02T23:21:52.3235946+08:00||;False|2026-02-02T23:21:47.1386702+08:00||;True|2026-02-02T23:20:46.6277206+08:00||;False|2026-02-02T23:20:40.3158947+08:00||;True|2026-02-02T22:55:39.4268475+08:00||;True|2026-02-01T21:34:30.5989260+08:00||;True|2026-02-01T21:30:20.7556066+08:00||;True|2026-01-30T21:56:47.1840381+08:00||;True|2026-01-28T22:01:00.8412391+08:00||;False|2026-01-28T21:49:29.1242233+08:00||;True|2026-01-28T21:48:26.1707204+08:00||;True|2026-01-28T21:48:05.8291762+08:00||;False|2026-01-28T21:48:01.1596391+08:00||;True|2026-01-28T21:37:59.4831763+08:00||;False|2026-01-28T21:37:53.5855464+08:00||;True|2026-01-28T21:27:51.1872828+08:00||;True|2026-01-28T13:01:14.1677037+08:00||;True|2026-01-28T12:36:45.7819776+08:00||;True|2026-01-28T12:09:15.6540204+08:00||;True|2026-01-28T12:08:40.0490617+08:00||;True|2026-01-28T11:58:55.4078870+08:00||;True|2026-01-27T22:37:03.3304942+08:00||;True|2026-01-27T22:05:40.4316281+08:00||;True|2026-01-26T22:30:43.5083924+08:00||;False|2026-01-26T22:30:33.7355213+08:00||;True|2026-01-26T22:26:26.0218548+08:00||;True|2026-01-26T22:21:32.3171217+08:00||;True|2026-01-26T22:20:40.3916780+08:00||;True|2026-01-26T22:16:19.1017273+08:00||;True|2026-01-26T22:13:34.2028883+08:00||;True|2026-01-26T21:46:23.7117812+08:00||;True|2026-01-26T21:41:19.6963033+08:00||;True|2026-01-25T21:27:13.9893777+08:00||;True|2026-01-24T21:45:22.8493624+08:00||;True|2026-01-24T21:31:35.4635265+08:00||;True|2026-01-24T21:27:31.3098506+08:00||;True|2026-01-24T15:47:01.6934638+08:00||;True|2026-01-24T15:32:35.6316009+08:00||;True|2026-01-24T15:16:28.7216639+08:00||;True|2026-01-23T22:14:26.8066324+08:00||;True|2026-01-23T13:36:48.4086406+08:00||;True|2026-01-23T13:30:27.2924204+08:00||;True|2026-01-23T13:02:53.3219368+08:00||;True|2026-01-23T13:01:54.3466638+08:00||;True|2026-01-23T13:01:28.8560809+08:00||;True|2026-01-22T23:18:32.0400436+08:00||;True|2026-01-22T22:29:29.5746209+08:00||;True|2026-01-22T21:32:21.7284081+08:00||;True|2026-01-22T21:20:26.5985955+08:00||;False|2026-01-22T21:20:21.1372539+08:00||;True|2026-01-22T21:11:18.3771739+08:00||;True|2026-01-22T20:58:55.9862778+08:00||;True|2026-01-22T20:51:48.6699461+08:00||;False|2026-01-22T20:51:42.2079210+08:00||;True|2026-01-22T20:50:34.7280114+08:00||;True|2026-01-22T20:50:11.1588492+08:00||;True|2026-01-22T16:11:14.0626037+08:00||;True|2026-01-22T15:53:16.6377347+08:00||;True|2026-01-22T15:45:34.0935091+08:00||;True|2026-01-22T12:44:28.1577014+08:00||;True|2026-01-22T12:40:45.7449335+08:00||;True|2026-01-22T12:39:07.0683214+08:00||;True|2026-01-22T09:55:49.7086190+08:00||;True|2026-01-22T01:37:53.6972395+08:00||; + True|2026-03-13T11:03:43.3888728Z||;True|2026-03-13T19:00:46.5678455+08:00||;True|2026-03-08T20:40:39.8018016+08:00||;True|2026-03-08T20:37:16.4384198+08:00||;True|2026-03-05T22:22:59.1986039+08:00||;True|2026-03-05T21:47:10.7337653+08:00||;True|2026-03-05T21:44:09.8036238+08:00||;False|2026-03-05T21:44:03.0581762+08:00||;True|2026-03-05T18:20:17.8376341+08:00||;True|2026-03-02T21:57:32.1274356+08:00||;True|2026-02-25T22:29:25.1875055+08:00||;True|2026-02-25T22:28:53.3053713+08:00||;True|2026-02-12T19:27:23.6648031+08:00||;True|2026-02-12T19:25:10.7424743+08:00||;True|2026-02-12T17:33:31.2163848+08:00||;True|2026-02-12T17:16:08.2015031+08:00||;False|2026-02-12T17:16:02.9041381+08:00||;True|2026-02-12T17:12:44.8082909+08:00||;True|2026-02-12T17:04:22.1666828+08:00||;True|2026-02-12T17:03:04.2760582+08:00||;True|2026-02-12T16:52:01.7403172+08:00||;True|2026-02-12T16:49:57.7070533+08:00||;False|2026-02-12T16:49:53.4063422+08:00||;True|2026-02-12T16:43:13.2040344+08:00||;False|2026-02-12T16:42:58.3321319+08:00||;True|2026-02-12T16:29:28.6386479+08:00||;True|2026-02-12T16:19:46.9195592+08:00||;True|2026-02-12T14:32:25.3192428+08:00||;True|2026-02-12T12:18:02.1864306+08:00||;True|2026-02-11T20:39:23.8084775+08:00||;True|2026-02-11T20:37:06.6507806+08:00||;True|2026-02-11T20:04:19.1839991+08:00||;True|2026-02-10T21:59:37.6685615+08:00||;True|2026-02-10T15:43:23.5038986+08:00||;True|2026-02-10T14:42:48.6214001+08:00||;True|2026-02-06T23:15:19.0037070+08:00||;True|2026-02-06T22:52:30.1006808+08:00||;True|2026-02-06T22:49:02.0056235+08:00||;True|2026-02-06T22:45:30.6355735+08:00||;False|2026-02-06T22:45:25.7210123+08:00||;True|2026-02-06T22:38:37.6994272+08:00||;True|2026-02-06T22:14:47.8146805+08:00||;True|2026-02-03T22:34:12.3588819+08:00||;True|2026-02-03T22:20:08.9945012+08:00||;True|2026-02-03T21:06:17.7655312+08:00||;True|2026-02-02T23:24:09.9134119+08:00||;True|2026-02-02T23:21:52.3235946+08:00||;False|2026-02-02T23:21:47.1386702+08:00||;True|2026-02-02T23:20:46.6277206+08:00||;False|2026-02-02T23:20:40.3158947+08:00||;True|2026-02-02T22:55:39.4268475+08:00||;True|2026-02-01T21:34:30.5989260+08:00||;True|2026-02-01T21:30:20.7556066+08:00||;True|2026-01-30T21:56:47.1840381+08:00||;True|2026-01-28T22:01:00.8412391+08:00||;False|2026-01-28T21:49:29.1242233+08:00||;True|2026-01-28T21:48:26.1707204+08:00||;True|2026-01-28T21:48:05.8291762+08:00||;False|2026-01-28T21:48:01.1596391+08:00||;True|2026-01-28T21:37:59.4831763+08:00||;False|2026-01-28T21:37:53.5855464+08:00||;True|2026-01-28T21:27:51.1872828+08:00||;True|2026-01-28T13:01:14.1677037+08:00||;True|2026-01-28T12:36:45.7819776+08:00||;True|2026-01-28T12:09:15.6540204+08:00||;True|2026-01-28T12:08:40.0490617+08:00||;True|2026-01-28T11:58:55.4078870+08:00||;True|2026-01-27T22:37:03.3304942+08:00||;True|2026-01-27T22:05:40.4316281+08:00||;True|2026-01-26T22:30:43.5083924+08:00||;False|2026-01-26T22:30:33.7355213+08:00||;True|2026-01-26T22:26:26.0218548+08:00||;True|2026-01-26T22:21:32.3171217+08:00||;True|2026-01-26T22:20:40.3916780+08:00||;True|2026-01-26T22:16:19.1017273+08:00||;True|2026-01-26T22:13:34.2028883+08:00||;True|2026-01-26T21:46:23.7117812+08:00||;True|2026-01-26T21:41:19.6963033+08:00||;True|2026-01-25T21:27:13.9893777+08:00||;True|2026-01-24T21:45:22.8493624+08:00||;True|2026-01-24T21:31:35.4635265+08:00||;True|2026-01-24T21:27:31.3098506+08:00||;True|2026-01-24T15:47:01.6934638+08:00||;True|2026-01-24T15:32:35.6316009+08:00||;True|2026-01-24T15:16:28.7216639+08:00||;True|2026-01-23T22:14:26.8066324+08:00||;True|2026-01-23T13:36:48.4086406+08:00||;True|2026-01-23T13:30:27.2924204+08:00||;True|2026-01-23T13:02:53.3219368+08:00||;True|2026-01-23T13:01:54.3466638+08:00||;True|2026-01-23T13:01:28.8560809+08:00||;True|2026-01-22T23:18:32.0400436+08:00||;True|2026-01-22T22:29:29.5746209+08:00||;True|2026-01-22T21:32:21.7284081+08:00||;True|2026-01-22T21:20:26.5985955+08:00||;False|2026-01-22T21:20:21.1372539+08:00||;True|2026-01-22T21:11:18.3771739+08:00||;True|2026-01-22T20:58:55.9862778+08:00||;True|2026-01-22T20:51:48.6699461+08:00||;False|2026-01-22T20:51:42.2079210+08:00||; \ No newline at end of file diff --git a/README.md b/README.md index 7be8e09..c24a1d7 100644 --- a/README.md +++ b/README.md @@ -95,8 +95,8 @@ Cookie 及 `sec_user_id` 是同步功能的核心,需严格按步骤获取, | 镜像标签 | 架构 | | ----------------- | -------------- | -| `beta_2.1.2` | x86_64 (amd64) | -| `arm_2.1.2` | ARM64 | +| `beta_2.1.5` | x86_64 (amd64) | +| `arm_2.1.5` | ARM64 | ### 构建命令示例 @@ -113,7 +113,7 @@ Cookie 及 `sec_user_id` 是同步功能的核心,需严格按步骤获取, services: dysync: - image: ccr.ccs.tencentyun.com/jianzhichu/dysync:beta_2.1.2 + image: ccr.ccs.tencentyun.com/jianzhichu/dysync:beta_2.1.5 container_name: dysync2026 # 容器名称 restart: unless-stopped # 始终重启容器,除非容器被手动停止或Docker服务停止 ports: diff --git a/app/src/pages/workplace/RecordTable.vue b/app/src/pages/workplace/RecordTable.vue index 3ecfa8c..c617514 100644 --- a/app/src/pages/workplace/RecordTable.vue +++ b/app/src/pages/workplace/RecordTable.vue @@ -3,8 +3,10 @@
+
+ @@ -13,7 +15,7 @@ - + @@ -23,6 +25,9 @@
+ + + 全部 @@ -40,22 +45,22 @@ 查询 - + - + 重新下载 - 批量删除 + 永久删除 @@ -226,6 +231,7 @@ interface QuaryParam { authorId: string; sortField?: string; // 📌 新增:排序字段 sortOrder?: string; // 📌 新增:排序方向(asc/desc) + cookieId?: string; } // 引入dayjs中文包 @@ -412,6 +418,7 @@ const quaryData: UnwrapRef = reactive({ fileHash: '', sortField: 'createTime', // 📌 默认排序字段 sortOrder: 'desc', // 📌 默认降序 + cookieId: '', }); // 分页配置 @@ -570,6 +577,29 @@ const handleTableChange = (paginationObj: any, filters: any, sorter: any) => { GetRecords(); }; +const cookies = ref([]); +const getCookies = () => { + useApiStore() + .CookiePageList({}) + .then((res) => { + if (res.data.data.length > 0) { + cookies.value = res.data.data.map((item) => { + return { + value: item['id'] ?? '', + label: item['userName'] ?? '', + }; + }); + cookies.value.unshift({ + value: '', // 全部对应的 value 为空字符串 + label: '全部', // 显示的文本,可根据需求修改 + }); + + quaryData.cookieId = cookies.value[0].value; + GetRecords(); + } + }); +}; + /** 立即同步 */ const StartNow = () => { if (isSyncing.value) return; @@ -1008,7 +1038,7 @@ const copyVideoPath = (path?: string) => { // -------------------------- 页面初始化 -------------------------- onMounted(() => { // getConfig(); - GetRecords(); + getCookies(); }); diff --git a/dy.net.csproj b/dy.net.csproj index 45c40c4..a49ebf3 100644 --- a/dy.net.csproj +++ b/dy.net.csproj @@ -131,7 +131,7 @@ - +