From edbcc1308698eb727536782858ea4af7f1872c2a Mon Sep 17 00:00:00 2001 From: jianzhichu Date: Mon, 26 Jan 2026 22:42:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controllers/ConfigController.cs | 5 +- Controllers/FollowController.cs | 6 +- Program.cs | 3 +- Properties/PublishProfiles/docker.pubxml | 2 +- Properties/PublishProfiles/docker.pubxml.user | 2 +- README.md | 6 +- app/src/pages/cok/CookieTable.vue | 235 +++++++++--------- dy.net.csproj | 2 +- job/DouYinCollectSyncJob.cs | 13 +- job/DouyinBasicSyncJob.cs | 158 ++++++------ job/DouyinFollowsAndCollnectsSyncJob.cs | 30 +-- model/dto/FollowErrorDto.cs | 24 -- model/dto/JobConfig.cs | 2 + model/dto/VideoTypeEnum.cs | 8 + model/entity/DouyinCookie.cs | 13 + service/DouyinCookieService.cs | 18 ++ service/DouyinFollowService.cs | 7 + service/DouyinHttpClientService.cs | 30 +-- service/DouyinQuartzJobService.cs | 204 +++++++++++---- 19 files changed, 438 insertions(+), 330 deletions(-) delete mode 100644 model/dto/FollowErrorDto.cs diff --git a/Controllers/ConfigController.cs b/Controllers/ConfigController.cs index 60aac53..d7e3d8a 100644 --- a/Controllers/ConfigController.cs +++ b/Controllers/ConfigController.cs @@ -169,6 +169,8 @@ namespace dy.net.Controllers if (!cookieValid) return ApiResult.Fail("Cookie无效,请按照文档提示重新获取有效Cookie,不要使用插件获取cookie"); + dyUserCookies.StatusCode = 0; + dyUserCookies.StatusMsg = "正常"; // 4. 保存到数据库 var saved = await dyCookieService.Add(dyUserCookies); return saved ? ApiResult.Success() : ApiResult.Fail("添加失败"); @@ -229,7 +231,8 @@ namespace dy.net.Controllers { return ApiResult.Fail("Cookie无效,请按照文档提示重新获取有效Cookie,不要使用插件获取cookie"); } - + dyUserCookies.StatusCode = 0; + dyUserCookies.StatusMsg = "正常"; if (dyUserCookies.Id == "0") { dyUserCookies.Id = IdGener.GetLong().ToString(); diff --git a/Controllers/FollowController.cs b/Controllers/FollowController.cs index f012908..9a76fc9 100644 --- a/Controllers/FollowController.cs +++ b/Controllers/FollowController.cs @@ -103,7 +103,11 @@ namespace dy.net.Controllers return await OpenOrCloseSync(dto); } - + /// + /// 删除关注对象 + /// + /// + /// [HttpPost("delete")] public async Task DeleteFollow(FollowUpdateDto dto) { diff --git a/Program.cs b/Program.cs index e7b7f3d..80bd962 100644 --- a/Program.cs +++ b/Program.cs @@ -229,8 +229,9 @@ namespace dy.net var config = commonService.InitConfig(); //Serilog.Log.Debug("isRestart1=" + config.IsFirstRunning); + await cookieService.UpdateCookieToSupportOldVersionAsync(); - //if (!isDevelopment) + if (!isDevelopment) { var cookie = await cookieService.GetOpendCookies(); if (cookie != null && cookie.Any()) diff --git a/Properties/PublishProfiles/docker.pubxml b/Properties/PublishProfiles/docker.pubxml index 6daceeb..20b084d 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 d63370e..1008b6b 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-01-25T13:27:13.9893777Z||;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-01-22T01:34:14.2142463+08:00||;True|2026-01-22T01:32:50.9228911+08:00||;True|2026-01-22T01:29:43.8871986+08:00||;True|2026-01-22T01:29:40.7838709+08:00||;True|2026-01-22T01:27:34.4763970+08:00||;True|2026-01-22T01:26:55.0117367+08:00||;True|2026-01-22T01:23:19.4789587+08:00||;True|2026-01-19T10:19:44.8997385+08:00||;True|2026-01-19T10:11:10.2305307+08:00||;True|2026-01-17T00:52:08.8180346+08:00||;False|2026-01-17T00:52:03.1829000+08:00||;True|2026-01-17T00:45:04.0498090+08:00||;True|2026-01-16T21:00:57.7239379+08:00||;True|2026-01-16T21:00:03.3912989+08:00||;True|2026-01-16T20:56:08.5505592+08:00||;True|2026-01-16T20:46:32.3067302+08:00||;True|2026-01-15T22:18:57.9835738+08:00||;True|2026-01-15T22:07:25.4753938+08:00||;True|2026-01-15T22:07:14.8243754+08:00||;True|2026-01-15T21:40:13.2613927+08:00||;True|2026-01-15T20:57:56.6291682+08:00||;True|2026-01-15T20:57:47.1363536+08:00||;True|2026-01-15T20:08:44.4710883+08:00||;True|2026-01-15T20:04:51.8284314+08:00||;False|2026-01-15T20:04:45.3258155+08:00||;True|2026-01-15T19:59:11.7907672+08:00||;True|2026-01-15T01:10:48.9066941+08:00||;True|2026-01-15T01:03:23.6216975+08:00||;True|2026-01-15T01:03:16.3364591+08:00||;False|2026-01-15T01:03:10.5654436+08:00||;True|2026-01-15T00:49:21.6559622+08:00||;True|2026-01-15T00:10:42.7288439+08:00||;True|2026-01-15T00:06:28.4241682+08:00||;True|2026-01-13T22:34:15.2372411+08:00||;True|2026-01-13T22:26:46.4522947+08:00||;True|2026-01-13T22:15:56.9735179+08:00||;True|2026-01-13T22:15:51.8250677+08:00||;False|2026-01-13T22:15:46.6608690+08:00||;True|2026-01-13T22:03:06.4683237+08:00||;False|2026-01-13T22:03:01.2036027+08:00||;True|2026-01-13T21:36:05.8776209+08:00||;True|2026-01-13T21:33:02.0766289+08:00||;False|2026-01-13T21:32:57.1976141+08:00||;True|2026-01-13T19:14:35.2519439+08:00||;True|2026-01-13T15:07:50.0836745+08:00||;False|2026-01-13T15:06:35.5929685+08:00||;True|2026-01-13T10:21:41.6012776+08:00||;True|2026-01-13T09:57:25.4788847+08:00||;True|2026-01-13T09:53:14.4900360+08:00||;True|2026-01-13T09:23:53.6465295+08:00||;True|2026-01-12T22:04:14.5886955+08:00||;False|2026-01-12T22:04:08.2008101+08:00||;True|2026-01-12T21:53:46.9947176+08:00||;True|2026-01-12T21:11:15.8358024+08:00||;True|2026-01-12T21:09:51.8663228+08:00||;True|2026-01-11T21:25:07.5052845+08:00||;False|2026-01-11T21:24:27.5744557+08:00||;True|2026-01-11T19:59:15.4734611+08:00||;False|2026-01-11T19:59:04.9543339+08:00||;True|2026-01-11T18:51:30.6649269+08:00||;True|2026-01-08T21:07:57.5094466+08:00||;True|2026-01-08T14:51:18.2266231+08:00||;True|2026-01-08T14:31:55.1137120+08:00||;True|2026-01-08T00:16:24.4451490+08:00||;True|2026-01-08T00:14:20.7430793+08:00||;True|2026-01-08T00:07:46.7228194+08:00||;True|2026-01-07T23:52:13.3290082+08:00||;True|2026-01-07T23:49:28.4838650+08:00||; + True|2026-01-26T14:30:43.5083924Z||;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-01-22T01:34:14.2142463+08:00||;True|2026-01-22T01:32:50.9228911+08:00||;True|2026-01-22T01:29:43.8871986+08:00||;True|2026-01-22T01:29:40.7838709+08:00||;True|2026-01-22T01:27:34.4763970+08:00||;True|2026-01-22T01:26:55.0117367+08:00||;True|2026-01-22T01:23:19.4789587+08:00||;True|2026-01-19T10:19:44.8997385+08:00||;True|2026-01-19T10:11:10.2305307+08:00||;True|2026-01-17T00:52:08.8180346+08:00||;False|2026-01-17T00:52:03.1829000+08:00||;True|2026-01-17T00:45:04.0498090+08:00||;True|2026-01-16T21:00:57.7239379+08:00||;True|2026-01-16T21:00:03.3912989+08:00||;True|2026-01-16T20:56:08.5505592+08:00||;True|2026-01-16T20:46:32.3067302+08:00||;True|2026-01-15T22:18:57.9835738+08:00||;True|2026-01-15T22:07:25.4753938+08:00||;True|2026-01-15T22:07:14.8243754+08:00||;True|2026-01-15T21:40:13.2613927+08:00||;True|2026-01-15T20:57:56.6291682+08:00||;True|2026-01-15T20:57:47.1363536+08:00||;True|2026-01-15T20:08:44.4710883+08:00||;True|2026-01-15T20:04:51.8284314+08:00||;False|2026-01-15T20:04:45.3258155+08:00||;True|2026-01-15T19:59:11.7907672+08:00||;True|2026-01-15T01:10:48.9066941+08:00||;True|2026-01-15T01:03:23.6216975+08:00||;True|2026-01-15T01:03:16.3364591+08:00||;False|2026-01-15T01:03:10.5654436+08:00||;True|2026-01-15T00:49:21.6559622+08:00||;True|2026-01-15T00:10:42.7288439+08:00||;True|2026-01-15T00:06:28.4241682+08:00||;True|2026-01-13T22:34:15.2372411+08:00||;True|2026-01-13T22:26:46.4522947+08:00||;True|2026-01-13T22:15:56.9735179+08:00||;True|2026-01-13T22:15:51.8250677+08:00||;False|2026-01-13T22:15:46.6608690+08:00||;True|2026-01-13T22:03:06.4683237+08:00||;False|2026-01-13T22:03:01.2036027+08:00||;True|2026-01-13T21:36:05.8776209+08:00||;True|2026-01-13T21:33:02.0766289+08:00||;False|2026-01-13T21:32:57.1976141+08:00||;True|2026-01-13T19:14:35.2519439+08:00||;True|2026-01-13T15:07:50.0836745+08:00||;False|2026-01-13T15:06:35.5929685+08:00||;True|2026-01-13T10:21:41.6012776+08:00||;True|2026-01-13T09:57:25.4788847+08:00||;True|2026-01-13T09:53:14.4900360+08:00||;True|2026-01-13T09:23:53.6465295+08:00||;True|2026-01-12T22:04:14.5886955+08:00||;False|2026-01-12T22:04:08.2008101+08:00||;True|2026-01-12T21:53:46.9947176+08:00||;True|2026-01-12T21:11:15.8358024+08:00||;True|2026-01-12T21:09:51.8663228+08:00||;True|2026-01-11T21:25:07.5052845+08:00||;False|2026-01-11T21:24:27.5744557+08:00||;True|2026-01-11T19:59:15.4734611+08:00||;False|2026-01-11T19:59:04.9543339+08:00||; \ No newline at end of file diff --git a/README.md b/README.md index 2bdb3be..8a1493b 100644 --- a/README.md +++ b/README.md @@ -95,8 +95,8 @@ Cookie 及 `sec_user_id` 是同步功能的核心,需严格按步骤获取, | 镜像标签 | 架构 | | ----------------- | -------------- | -| `beta_2.0.5` | x86_64 (amd64) | -| `arm_2.0.5` | ARM64 | +| `beta_2.0.6` | x86_64 (amd64) | +| `arm_2.0.6` | ARM64 | ### 构建命令示例 @@ -115,7 +115,7 @@ version: '3.8' services: dysync: - image: ccr.ccs.tencentyun.com/jianzhichu/dysync:beta_2.0.5 + image: ccr.ccs.tencentyun.com/jianzhichu/dysync:beta_2.0.6 container_name: dysync2026 # 容器名称 restart: unless-stopped # 始终重启容器,除非容器被手动停止或Docker服务停止 ports: diff --git a/app/src/pages/cok/CookieTable.vue b/app/src/pages/cok/CookieTable.vue index a456171..3d530da 100644 --- a/app/src/pages/cok/CookieTable.vue +++ b/app/src/pages/cok/CookieTable.vue @@ -55,12 +55,15 @@ type DataItem = { upSecUserIds?: string; upSavePath?: string; // imgSavePath?: string; - useSinglePath?: boolean; // 新增:是否全部用一个地址 + // useSinglePath?: boolean; // 新增:是否全部用一个地址 useCollectFolder?: boolean; downMix?: boolean; downSeries?: boolean; mixPath?: string; seriesPath?: string; + downCollect?: boolean; + downFavorite?: boolean; + downFollowd?: boolean; }; const loading = ref(false); @@ -120,12 +123,15 @@ const newCookie = (cookie?: DataItem) => { cookie.upSecUserIdsJson = undefined; cookie.upSavePath = undefined; // cookie.imgSavePath = undefined; - cookie.useSinglePath = false; // 新增:默认不使用单一路径 + // cookie.useSinglePath = false; // 新增:默认不使用单一路径 cookie.useCollectFolder = false; //是否按收藏夹来下载。 cookie.downMix = false; //是否下载收藏夹的合集 cookie.downSeries = false; //是否下载短剧 cookie.mixPath = undefined; //合集存储路径 cookie.seriesPath = undefined; //短剧存储路径 + cookie.downCollect = false; + cookie.downFavorite = false; + cookie.downFollowd = false; return cookie; }; @@ -139,17 +145,17 @@ const copyObject = (target: any, source?: any) => { const form = reactive(newCookie()); // 新增:监听收藏路径变化,当启用单一路径时同步到其他路径 -watch( - [() => form.savePath, () => form.useSinglePath], - ([newSavePath, useSinglePath]) => { - if (useSinglePath && newSavePath) { - form.favSavePath = newSavePath; - form.upSavePath = newSavePath; - // form.imgSavePath = newSavePath; - } - }, - { immediate: true } -); +// watch( +// [() => form.savePath, () => form.useSinglePath], +// ([newSavePath, useSinglePath]) => { +// // if (useSinglePath && newSavePath) { +// // form.favSavePath = newSavePath; +// // form.upSavePath = newSavePath; +// // // form.imgSavePath = newSavePath; +// // } +// }, +// { immediate: true } +// ); function reset() { return newCookie(form); @@ -181,11 +187,11 @@ function submit() { loading.value = false; if (res.code === 0) { showModal.value = false; - message.success('修改成功,同步任务将在5-10秒按新配置运行...'); + message.success('保存成功,同步任务将在5-10秒后重新启动...'); reset(); GetRecords(); - }else{ - message.success('修改失败,'+res.message); + } else { + message.error('保存失败' + res.message); } }); }) @@ -231,9 +237,9 @@ function edit(record: DataItem) { console.log(record); copyObject(form, record); // 确保useSinglePath有默认值 - if (form.useSinglePath === undefined) { - form.useSinglePath = false; - } + // if (form.useSinglePath === undefined) { + // form.useSinglePath = false; + // } showModal.value = true; } @@ -311,7 +317,7 @@ const removeRow = (index: number) => { form.upSecUserIdsJson.splice(index, 1); } }; -const rowCount = 5; +const rowCount = 10; // 组件挂载时获取配置 onMounted(() => { @@ -496,6 +502,10 @@ const saveDrawerData = () => { drawerPagination.loading = false; }); }; + +const switchdownCollect = (e: any) => { + if (!e) form.useCollectFolder = e; +};