diff --git a/Controllers/ConfigController.cs b/Controllers/ConfigController.cs index 3b21aba..6bd769e 100644 --- a/Controllers/ConfigController.cs +++ b/Controllers/ConfigController.cs @@ -2,6 +2,7 @@ using dy.net.dto; using dy.net.model; using dy.net.service; +using dy.sync.lib; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; @@ -20,12 +21,14 @@ namespace dy.net.Controllers private readonly DouyinCommonService commonService; private readonly DouyinQuartzJobService quartzJobService; + private readonly IHttpClientFactory httpClientFactory; - public ConfigController(DouyinCookieService dyCookieService, DouyinCommonService commonService,DouyinQuartzJobService quartzJobService) + public ConfigController(DouyinCookieService dyCookieService, DouyinCommonService commonService,DouyinQuartzJobService quartzJobService,IHttpClientFactory httpClientFactory) { this.dyCookieService = dyCookieService; this.commonService = commonService; this.quartzJobService = quartzJobService; + this.httpClientFactory = httpClientFactory; } @@ -163,5 +166,29 @@ namespace dy.net.Controllers quartzJobService.InitOrReStartAllJobs(config.Cron.ToString()); //避免前端等待 } + /// + /// 镜像标签 + /// + /// + [HttpGet("mytag")] + public async Task GetMyTag() + { + return Ok(new { code = 0, data =Appsettings.Get("tagName") }); + } + + [HttpGet("checktag")] + public async Task CheckTag() + { + var data =await DouyinHttpHelper.GetTenImage(Appsettings.Get("tagName")); + if (data.IsSuccessStatusCode) + { + var content = await data.Content.ReadAsStringAsync(); + return Ok(content); + } + else + { + return BadRequest(new { code = -1, message = "请求失败" }); + } + } } } diff --git a/Properties/PublishProfiles/FolderProfile.pubxml.user b/Properties/PublishProfiles/FolderProfile.pubxml.user index c09989f..6ca2098 100644 --- a/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. <_PublishTargetUrl>E:\code\dysync\bin\Release\net6.0\publish\ - True|2025-11-29T18:06:06.6099669Z||;True|2025-11-30T01:49:46.4358206+08:00||;False|2025-11-30T01:49:34.4884036+08:00||;True|2025-11-30T01:43:41.1028753+08:00||;True|2025-11-30T01:38:18.2856609+08:00||;True|2025-11-30T01:23:02.4378259+08:00||;True|2025-11-30T01:08:29.4041159+08:00||;True|2025-11-30T00:56:33.4172007+08:00||;False|2025-11-30T00:56:21.2777389+08:00||;True|2025-11-27T13:37:08.6884390+08:00||;False|2025-11-27T13:36:54.2595622+08:00||;True|2025-11-27T11:03:33.8401644+08:00||;False|2025-11-27T11:02:48.8942827+08:00||;True|2025-11-26T23:48:02.3957186+08:00||;True|2025-11-26T23:43:06.8154188+08:00||;False|2025-11-26T23:42:05.9191485+08:00||;True|2025-11-26T23:30:11.1295861+08:00||;True|2025-11-26T00:00:42.1507258+08:00||;True|2025-11-26T00:00:17.0107229+08:00||;True|2025-11-25T23:42:07.4349629+08:00||;False|2025-11-25T23:41:56.9328658+08:00||;True|2025-11-25T23:19:32.5262917+08:00||;True|2025-11-25T14:08:53.3850967+08:00||;True|2025-11-24T23:53:54.4283003+08:00||;True|2025-11-24T23:41:15.8248332+08:00||;True|2025-11-24T23:33:57.1844427+08:00||;True|2025-11-24T23:31:54.9228836+08:00||;True|2025-11-24T23:24:15.8681502+08:00||;True|2025-11-24T23:22:57.9046229+08:00||;True|2025-11-24T23:18:04.1131647+08:00||;True|2025-11-24T22:47:54.1336448+08:00||;True|2025-11-24T22:47:18.3613833+08:00||;True|2025-11-24T08:17:50.3994607+08:00||;True|2025-11-24T08:07:00.9951205+08:00||;True|2025-11-23T23:34:50.0030826+08:00||;True|2025-11-23T23:32:36.7452616+08:00||;True|2025-11-22T23:18:56.3202345+08:00||;True|2025-11-22T22:52:51.7203302+08:00||;True|2025-11-22T22:52:42.9620946+08:00||;True|2025-11-22T22:52:09.8257640+08:00||;True|2025-11-22T22:39:31.5894141+08:00||;True|2025-11-22T22:31:11.0704815+08:00||;True|2025-11-22T22:20:36.4579131+08:00||;True|2025-11-22T22:19:10.2281364+08:00||;True|2025-11-22T19:34:45.9336901+08:00||;True|2025-11-12T23:06:38.7834109+08:00||;False|2025-11-12T23:01:02.2269478+08:00||;True|2025-10-22T22:08:11.6423148+08:00||;True|2025-10-22T21:54:24.7180547+08:00||;True|2025-10-22T21:40:03.5194315+08:00||;True|2025-10-22T21:28:28.8962766+08:00||;True|2025-10-22T21:22:47.9631689+08:00||;True|2025-10-22T21:18:24.5274318+08:00||;True|2025-10-22T21:14:51.6386326+08:00||;False|2025-10-22T21:14:07.6282769+08:00||;True|2025-10-22T21:03:48.9892860+08:00||;True|2025-10-22T21:00:56.3617243+08:00||;False|2025-10-22T21:00:30.5472941+08:00||;True|2025-10-22T20:51:29.6155916+08:00||;False|2025-10-22T20:50:47.1882956+08:00||;True|2025-10-22T15:01:04.1668366+08:00||;True|2025-10-22T14:49:43.6340569+08:00||;True|2025-10-22T14:38:39.4685603+08:00||;True|2025-10-21T18:35:28.8392541+08:00||;True|2025-10-20T10:31:05.5865212+08:00||;True|2025-10-20T10:20:41.5717101+08:00||;True|2025-10-19T10:08:33.6669332+08:00||;False|2025-10-19T10:07:22.3337545+08:00||;False|2025-10-19T10:05:22.9484805+08:00||;True|2025-10-10T16:54:27.1472888+08:00||;False|2025-10-10T16:53:44.1700030+08:00||;False|2025-10-10T16:52:48.1740453+08:00||;False|2025-10-10T16:51:21.5067253+08:00||;False|2025-10-10T16:50:19.2140597+08:00||;False|2025-10-10T16:49:21.2213290+08:00||;False|2025-10-10T16:48:47.7229948+08:00||;False|2025-10-10T16:48:15.1258700+08:00||;True|2025-09-30T13:29:42.2354235+08:00||;True|2025-09-25T11:44:52.6858389+08:00||;True|2025-09-25T11:08:27.8810109+08:00||;True|2025-09-25T09:28:50.2563374+08:00||;True|2025-09-24T16:14:02.3072184+08:00||;True|2025-09-23T22:38:52.4414757+08:00||;True|2025-09-23T22:19:07.1006356+08:00||;True|2025-09-23T22:18:01.5945225+08:00||;True|2025-09-23T22:06:15.6293613+08:00||;True|2025-09-23T21:53:14.2977444+08:00||;True|2025-09-23T21:46:55.2322411+08:00||;False|2025-09-23T21:45:23.7858854+08:00||;False|2025-09-23T21:03:51.8325689+08:00||;True|2025-09-23T10:03:32.2251920+08:00||;False|2025-09-23T09:38:08.2372201+08:00||;False|2025-09-23T09:37:49.9390545+08:00||;True|2024-03-11T21:31:45.8102398+08:00||;True|2024-03-11T07:26:24.7660541+08:00||;True|2024-03-08T22:08:40.0154831+08:00||;True|2024-03-03T10:14:36.8109114+08:00||;True|2024-03-02T18:44:57.3288537+08:00||;True|2024-01-24T17:51:37.9164415+08:00||;True|2024-01-24T16:36:50.5612157+08:00||; + True|2025-11-30T13:16:56.7088027Z||;False|2025-11-30T21:16:46.1444944+08:00||;True|2025-11-30T20:21:24.4059664+08:00||;False|2025-11-30T20:21:17.6006098+08:00||;True|2025-11-30T20:20:08.2030141+08:00||;False|2025-11-30T20:16:12.3608968+08:00||;True|2025-11-30T20:15:35.6048313+08:00||;True|2025-11-30T19:45:18.7229552+08:00||;True|2025-11-30T19:45:08.6083368+08:00||;False|2025-11-30T19:44:54.7824905+08:00||;True|2025-11-30T19:44:17.0179491+08:00||;True|2025-11-30T19:44:06.7073484+08:00||;False|2025-11-30T19:43:58.2896556+08:00||;True|2025-11-30T19:42:08.2261927+08:00||;True|2025-11-30T19:28:15.7115077+08:00||;False|2025-11-30T19:28:10.2280725+08:00||;True|2025-11-30T19:23:31.7859158+08:00||;True|2025-11-30T19:23:20.7788277+08:00||;True|2025-11-30T19:17:11.8583296+08:00||;False|2025-11-30T19:10:41.8369574+08:00||;True|2025-11-30T19:02:08.8184758+08:00||;False|2025-11-30T19:01:59.4711045+08:00||;True|2025-11-30T18:16:01.8372242+08:00||;True|2025-11-30T14:50:31.9356543+08:00||;True|2025-11-30T14:48:27.1833064+08:00||;True|2025-11-30T02:06:06.6099669+08:00||;True|2025-11-30T01:49:46.4358206+08:00||;False|2025-11-30T01:49:34.4884036+08:00||;True|2025-11-30T01:43:41.1028753+08:00||;True|2025-11-30T01:38:18.2856609+08:00||;True|2025-11-30T01:23:02.4378259+08:00||;True|2025-11-30T01:08:29.4041159+08:00||;True|2025-11-30T00:56:33.4172007+08:00||;False|2025-11-30T00:56:21.2777389+08:00||;True|2025-11-27T13:37:08.6884390+08:00||;False|2025-11-27T13:36:54.2595622+08:00||;True|2025-11-27T11:03:33.8401644+08:00||;False|2025-11-27T11:02:48.8942827+08:00||;True|2025-11-26T23:48:02.3957186+08:00||;True|2025-11-26T23:43:06.8154188+08:00||;False|2025-11-26T23:42:05.9191485+08:00||;True|2025-11-26T23:30:11.1295861+08:00||;True|2025-11-26T00:00:42.1507258+08:00||;True|2025-11-26T00:00:17.0107229+08:00||;True|2025-11-25T23:42:07.4349629+08:00||;False|2025-11-25T23:41:56.9328658+08:00||;True|2025-11-25T23:19:32.5262917+08:00||;True|2025-11-25T14:08:53.3850967+08:00||;True|2025-11-24T23:53:54.4283003+08:00||;True|2025-11-24T23:41:15.8248332+08:00||;True|2025-11-24T23:33:57.1844427+08:00||;True|2025-11-24T23:31:54.9228836+08:00||;True|2025-11-24T23:24:15.8681502+08:00||;True|2025-11-24T23:22:57.9046229+08:00||;True|2025-11-24T23:18:04.1131647+08:00||;True|2025-11-24T22:47:54.1336448+08:00||;True|2025-11-24T22:47:18.3613833+08:00||;True|2025-11-24T08:17:50.3994607+08:00||;True|2025-11-24T08:07:00.9951205+08:00||;True|2025-11-23T23:34:50.0030826+08:00||;True|2025-11-23T23:32:36.7452616+08:00||;True|2025-11-22T23:18:56.3202345+08:00||;True|2025-11-22T22:52:51.7203302+08:00||;True|2025-11-22T22:52:42.9620946+08:00||;True|2025-11-22T22:52:09.8257640+08:00||;True|2025-11-22T22:39:31.5894141+08:00||;True|2025-11-22T22:31:11.0704815+08:00||;True|2025-11-22T22:20:36.4579131+08:00||;True|2025-11-22T22:19:10.2281364+08:00||;True|2025-11-22T19:34:45.9336901+08:00||;True|2025-11-12T23:06:38.7834109+08:00||;False|2025-11-12T23:01:02.2269478+08:00||;True|2025-10-22T22:08:11.6423148+08:00||;True|2025-10-22T21:54:24.7180547+08:00||;True|2025-10-22T21:40:03.5194315+08:00||;True|2025-10-22T21:28:28.8962766+08:00||;True|2025-10-22T21:22:47.9631689+08:00||;True|2025-10-22T21:18:24.5274318+08:00||;True|2025-10-22T21:14:51.6386326+08:00||;False|2025-10-22T21:14:07.6282769+08:00||;True|2025-10-22T21:03:48.9892860+08:00||;True|2025-10-22T21:00:56.3617243+08:00||;False|2025-10-22T21:00:30.5472941+08:00||;True|2025-10-22T20:51:29.6155916+08:00||;False|2025-10-22T20:50:47.1882956+08:00||;True|2025-10-22T15:01:04.1668366+08:00||;True|2025-10-22T14:49:43.6340569+08:00||;True|2025-10-22T14:38:39.4685603+08:00||;True|2025-10-21T18:35:28.8392541+08:00||;True|2025-10-20T10:31:05.5865212+08:00||;True|2025-10-20T10:20:41.5717101+08:00||;True|2025-10-19T10:08:33.6669332+08:00||;False|2025-10-19T10:07:22.3337545+08:00||;False|2025-10-19T10:05:22.9484805+08:00||;True|2025-10-10T16:54:27.1472888+08:00||;False|2025-10-10T16:53:44.1700030+08:00||;False|2025-10-10T16:52:48.1740453+08:00||;False|2025-10-10T16:51:21.5067253+08:00||;False|2025-10-10T16:50:19.2140597+08:00||;False|2025-10-10T16:49:21.2213290+08:00||; diff --git a/README.md b/README.md index ecc0328..3a46748 100644 --- a/README.md +++ b/README.md @@ -91,12 +91,13 @@ Cookie 及 `sec_user_id` 是同步功能的核心,需严格按步骤获取, | 镜像标签 | 架构 | 功能描述 | | ----------------- | -------------- | --------------------------------------------------------------------- | -| `latest` | x86_64 (amd64) | **标准版**- 包含核心功能- **不含 FFmpeg**- 不能下载图文视频 | -| `full_latest` | x86_64 (amd64) | **完整版**- 包含全部核心功能- **内置 FFmpeg**- 支持图文视频下载与合成 | -| `arm_latest` | ARM64 | **ARM 标准版**- 核心功能(与 `latest` 一致) | -| `full_arm_latest` | ARM64 | **ARM 完整版**- 完整功能(与 `full_latest` 一致) | -| `beta_1.2` | x86_64 (amd64) | **测试版 v1.0**- 测试版 | +| `mini_1.5.7` | x86_64 (amd64) | **精简版**- 不能下载图文视频 | +| `beta_1.5.7` | x86_64 (amd64) | **完整版**- 支持图文视频下载与合成 | +| `armmin_1.5.7` | ARM64 | **ARM 精简版**- 不能下载图文视频 | +| `arm_1.5.7` | ARM64 | **ARM 完整版**- 支持图文视频下载与合成 | +### 最新镜像查看 +[镜像列表](http://nas.synology2023.online:10108/api/docker/dysync/1) ### 构建命令示例 将下方命令中的「本地路径」替换为你的实际路径,终端执行即可: @@ -111,7 +112,7 @@ docker run -d --restart=always \ -v /opt/dysync/uper:/app/uper \ -p 10103:10101 \ --name dysync2025 \ - registry.cn-hangzhou.aliyuncs.com/jianzhichu/dysync.net:latest + ccr.ccs.tencentyun.com/jianzhichu/dysync:beta_1.5.7 # 注意:-p 后面的容器端口,可以用环境变量类似:ASPNETCORE_URLS = http://+:10108 指定 ``` @@ -125,7 +126,7 @@ version: '3.8' services: dysync: - image: registry.cn-hangzhou.aliyuncs.com/jianzhichu/dysync.net:latest + image: ccr.ccs.tencentyun.com/jianzhichu/dysync:beta_1.5.7 container_name: dysync2025 # 容器名称 restart: unless-stopped # 始终重启容器,除非容器被手动停止或Docker服务停止 ports: @@ -168,7 +169,7 @@ services:  - + ## 🚀 5. 已有功能与计划 @@ -196,3 +197,6 @@ services: 11. ✅ 选中记录,批量重新同步。以及分享(比较简陋) +12. ⭕️ 关注列表支持新增,非关注的博主 + + diff --git a/app/coll2/author/2253324655537024.jpg b/app/coll2/author/2253324655537024.jpg deleted file mode 100644 index b40c5b5..0000000 Binary files a/app/coll2/author/2253324655537024.jpg and /dev/null differ diff --git a/app/coll2/author/3432007521806423.jpg b/app/coll2/author/3432007521806423.jpg deleted file mode 100644 index 27a21cd..0000000 Binary files a/app/coll2/author/3432007521806423.jpg and /dev/null differ diff --git a/app/coll2/author/3833318009221843.jpg b/app/coll2/author/3833318009221843.jpg deleted file mode 100644 index a97c192..0000000 Binary files a/app/coll2/author/3833318009221843.jpg and /dev/null differ diff --git a/app/coll2/author/93288642596.jpg b/app/coll2/author/93288642596.jpg deleted file mode 100644 index b3a8680..0000000 Binary files a/app/coll2/author/93288642596.jpg and /dev/null differ diff --git a/app/coll2/个人管理/打工人必备3个邪修办公工具,早用早下班!!#办公技巧#干货分享#文员#找工作#vlog日常@7572551496727769209/.nfo b/app/coll2/个人管理/打工人必备3个邪修办公工具,早用早下班!!#办公技巧#干货分享#文员#找工作#vlog日常@7572551496727769209/.nfo deleted file mode 100644 index 1f98977..0000000 --- a/app/coll2/个人管理/打工人必备3个邪修办公工具,早用早下班!!#办公技巧#干货分享#文员#找工作#vlog日常@7572551496727769209/.nfo +++ /dev/null @@ -1,20 +0,0 @@ - - - 打工人必备3个邪修办公工具,早用早下班!!#办公技巧 #干货分享 #文员 #找工作 #vlog日常 - 丸子不是圆子 - 2025-11-14 - 个人管理 - 职场技能 - 办公效率 - - - 丸子不是圆子 - 主演 - app/coll2\author\3833318009221843.jpg - - - poster.jpg - - poster.jpg - - \ No newline at end of file diff --git a/app/coll2/个人管理/打工人必备3个邪修办公工具,早用早下班!!#办公技巧#干货分享#文员#找工作#vlog日常@7572551496727769209/7572551496727769209.mp4 b/app/coll2/个人管理/打工人必备3个邪修办公工具,早用早下班!!#办公技巧#干货分享#文员#找工作#vlog日常@7572551496727769209/7572551496727769209.mp4 deleted file mode 100644 index d0a38ab..0000000 Binary files a/app/coll2/个人管理/打工人必备3个邪修办公工具,早用早下班!!#办公技巧#干货分享#文员#找工作#vlog日常@7572551496727769209/7572551496727769209.mp4 and /dev/null differ diff --git a/app/coll2/个人管理/打工人必备3个邪修办公工具,早用早下班!!#办公技巧#干货分享#文员#找工作#vlog日常@7572551496727769209/poster.jpg b/app/coll2/个人管理/打工人必备3个邪修办公工具,早用早下班!!#办公技巧#干货分享#文员#找工作#vlog日常@7572551496727769209/poster.jpg deleted file mode 100644 index a0b2a65..0000000 Binary files a/app/coll2/个人管理/打工人必备3个邪修办公工具,早用早下班!!#办公技巧#干货分享#文员#找工作#vlog日常@7572551496727769209/poster.jpg and /dev/null differ diff --git a/app/coll2/时尚/冬天穿羽绒服就扎这三款丸子头#简单盘发教程#扎发教程#简单好看发型#日常编发#盘发@7574407682967921235/.nfo b/app/coll2/时尚/冬天穿羽绒服就扎这三款丸子头#简单盘发教程#扎发教程#简单好看发型#日常编发#盘发@7574407682967921235/.nfo deleted file mode 100644 index 55b9cc6..0000000 --- a/app/coll2/时尚/冬天穿羽绒服就扎这三款丸子头#简单盘发教程#扎发教程#简单好看发型#日常编发#盘发@7574407682967921235/.nfo +++ /dev/null @@ -1,20 +0,0 @@ - - - 冬天穿羽绒服就扎这三款丸子头 #简单盘发教程 #扎发教程 #简单好看发型 #日常编发 #盘发 - 爱编发的小童 - 2025-11-19 - 时尚 - 彩妆 - 发型 - - - 爱编发的小童 - 主演 - app/coll2\author\2253324655537024.jpg - - - poster.jpg - - poster.jpg - - \ No newline at end of file diff --git a/app/coll2/时尚/冬天穿羽绒服就扎这三款丸子头#简单盘发教程#扎发教程#简单好看发型#日常编发#盘发@7574407682967921235/7574407682967921235.mp4 b/app/coll2/时尚/冬天穿羽绒服就扎这三款丸子头#简单盘发教程#扎发教程#简单好看发型#日常编发#盘发@7574407682967921235/7574407682967921235.mp4 deleted file mode 100644 index a18da7a..0000000 Binary files a/app/coll2/时尚/冬天穿羽绒服就扎这三款丸子头#简单盘发教程#扎发教程#简单好看发型#日常编发#盘发@7574407682967921235/7574407682967921235.mp4 and /dev/null differ diff --git a/app/coll2/时尚/冬天穿羽绒服就扎这三款丸子头#简单盘发教程#扎发教程#简单好看发型#日常编发#盘发@7574407682967921235/poster.jpg b/app/coll2/时尚/冬天穿羽绒服就扎这三款丸子头#简单盘发教程#扎发教程#简单好看发型#日常编发#盘发@7574407682967921235/poster.jpg deleted file mode 100644 index 0e82461..0000000 Binary files a/app/coll2/时尚/冬天穿羽绒服就扎这三款丸子头#简单盘发教程#扎发教程#简单好看发型#日常编发#盘发@7574407682967921235/poster.jpg and /dev/null differ diff --git a/app/coll2/时政社会/“最好的医生”其实就在你身边,医生眼里的“最好”:白开水、阳光、徒步……@7569780541189262618/.nfo b/app/coll2/时政社会/“最好的医生”其实就在你身边,医生眼里的“最好”:白开水、阳光、徒步……@7569780541189262618/.nfo deleted file mode 100644 index 9785844..0000000 --- a/app/coll2/时政社会/“最好的医生”其实就在你身边,医生眼里的“最好”:白开水、阳光、徒步……@7569780541189262618/.nfo +++ /dev/null @@ -1,20 +0,0 @@ - - - “最好的医生”其实就在你身边,医生眼里的“最好”:白开水、阳光、徒步…… - 新华社 - 2025-11-07 - 时政社会 - 社会新闻 - 民生 - - - 新华社 - 主演 - app/coll2\author\93288642596.jpg - - - poster.jpg - - poster.jpg - - \ No newline at end of file diff --git a/app/coll2/时政社会/“最好的医生”其实就在你身边,医生眼里的“最好”:白开水、阳光、徒步……@7569780541189262618/7569780541189262618.mp4 b/app/coll2/时政社会/“最好的医生”其实就在你身边,医生眼里的“最好”:白开水、阳光、徒步……@7569780541189262618/7569780541189262618.mp4 deleted file mode 100644 index f1e560c..0000000 Binary files a/app/coll2/时政社会/“最好的医生”其实就在你身边,医生眼里的“最好”:白开水、阳光、徒步……@7569780541189262618/7569780541189262618.mp4 and /dev/null differ diff --git a/app/coll2/时政社会/“最好的医生”其实就在你身边,医生眼里的“最好”:白开水、阳光、徒步……@7569780541189262618/poster.jpg b/app/coll2/时政社会/“最好的医生”其实就在你身边,医生眼里的“最好”:白开水、阳光、徒步……@7569780541189262618/poster.jpg deleted file mode 100644 index b27cf19..0000000 Binary files a/app/coll2/时政社会/“最好的医生”其实就在你身边,医生眼里的“最好”:白开水、阳光、徒步……@7569780541189262618/poster.jpg and /dev/null differ diff --git a/app/coll2/时政社会/披星戴月的日子值吗?男孩分享爸爸送给自己的一段话,自律的苦轻如鸿毛,后悔的痛重过千斤。@7575464272650718479/.nfo b/app/coll2/时政社会/披星戴月的日子值吗?男孩分享爸爸送给自己的一段话,自律的苦轻如鸿毛,后悔的痛重过千斤。@7575464272650718479/.nfo deleted file mode 100644 index ab5aa9d..0000000 --- a/app/coll2/时政社会/披星戴月的日子值吗?男孩分享爸爸送给自己的一段话,自律的苦轻如鸿毛,后悔的痛重过千斤。@7575464272650718479/.nfo +++ /dev/null @@ -1,20 +0,0 @@ - - - 披星戴月的日子值吗?男孩分享爸爸送给自己的一段话,自律的苦轻如鸿毛,后悔的痛重过千斤。 - 新华社 - 2025-11-22 - 时政社会 - 社会新闻 - 民生 - - - 新华社 - 主演 - app/coll2\author\93288642596.jpg - - - poster.jpg - - poster.jpg - - \ No newline at end of file diff --git a/app/coll2/时政社会/披星戴月的日子值吗?男孩分享爸爸送给自己的一段话,自律的苦轻如鸿毛,后悔的痛重过千斤。@7575464272650718479/7575464272650718479.mp4 b/app/coll2/时政社会/披星戴月的日子值吗?男孩分享爸爸送给自己的一段话,自律的苦轻如鸿毛,后悔的痛重过千斤。@7575464272650718479/7575464272650718479.mp4 deleted file mode 100644 index 667e164..0000000 Binary files a/app/coll2/时政社会/披星戴月的日子值吗?男孩分享爸爸送给自己的一段话,自律的苦轻如鸿毛,后悔的痛重过千斤。@7575464272650718479/7575464272650718479.mp4 and /dev/null differ diff --git a/app/coll2/时政社会/披星戴月的日子值吗?男孩分享爸爸送给自己的一段话,自律的苦轻如鸿毛,后悔的痛重过千斤。@7575464272650718479/poster.jpg b/app/coll2/时政社会/披星戴月的日子值吗?男孩分享爸爸送给自己的一段话,自律的苦轻如鸿毛,后悔的痛重过千斤。@7575464272650718479/poster.jpg deleted file mode 100644 index 02bfebc..0000000 Binary files a/app/coll2/时政社会/披星戴月的日子值吗?男孩分享爸爸送给自己的一段话,自律的苦轻如鸿毛,后悔的痛重过千斤。@7575464272650718479/poster.jpg and /dev/null differ diff --git a/app/coll2/校园教育/每天练一题,让孩子爱上数学!小学数学奥数竖式谜口诀解题技巧#小学数学#小学奥数#小学数学解题技@7576556688581332265/.nfo b/app/coll2/校园教育/每天练一题,让孩子爱上数学!小学数学奥数竖式谜口诀解题技巧#小学数学#小学奥数#小学数学解题技@7576556688581332265/.nfo deleted file mode 100644 index c7e372d..0000000 --- a/app/coll2/校园教育/每天练一题,让孩子爱上数学!小学数学奥数竖式谜口诀解题技巧#小学数学#小学奥数#小学数学解题技@7576556688581332265/.nfo +++ /dev/null @@ -1,20 +0,0 @@ - - - 每天练一题,让孩子爱上数学!小学数学奥数竖式谜口诀解题技巧 #小学数学 #小学奥数 #小学数学解题技巧 #小学数学思维 #小学数学题讲解视频 - 懒熊数学思维(小学奥数) - 2025-11-25 - 校园教育 - K12教育 - 学科教育 - - - 懒熊数学思维(小学奥数) - 主演 - app/coll2\author\3432007521806423.jpg - - - poster.jpg - - poster.jpg - - \ No newline at end of file diff --git a/app/coll2/校园教育/每天练一题,让孩子爱上数学!小学数学奥数竖式谜口诀解题技巧#小学数学#小学奥数#小学数学解题技@7576556688581332265/7576556688581332265.mp4 b/app/coll2/校园教育/每天练一题,让孩子爱上数学!小学数学奥数竖式谜口诀解题技巧#小学数学#小学奥数#小学数学解题技@7576556688581332265/7576556688581332265.mp4 deleted file mode 100644 index 4e683fe..0000000 Binary files a/app/coll2/校园教育/每天练一题,让孩子爱上数学!小学数学奥数竖式谜口诀解题技巧#小学数学#小学奥数#小学数学解题技@7576556688581332265/7576556688581332265.mp4 and /dev/null differ diff --git a/app/coll2/校园教育/每天练一题,让孩子爱上数学!小学数学奥数竖式谜口诀解题技巧#小学数学#小学奥数#小学数学解题技@7576556688581332265/poster.jpg b/app/coll2/校园教育/每天练一题,让孩子爱上数学!小学数学奥数竖式谜口诀解题技巧#小学数学#小学奥数#小学数学解题技@7576556688581332265/poster.jpg deleted file mode 100644 index f463776..0000000 Binary files a/app/coll2/校园教育/每天练一题,让孩子爱上数学!小学数学奥数竖式谜口诀解题技巧#小学数学#小学奥数#小学数学解题技@7576556688581332265/poster.jpg and /dev/null differ diff --git a/app/coll2/随拍/炒瓜子晃两下就冒烟,这操作我直接看呆#路边摊美味#美食#搞笑#生活#热门@7561466856432799022/7561466856432799022.mp4 b/app/coll2/随拍/炒瓜子晃两下就冒烟,这操作我直接看呆#路边摊美味#美食#搞笑#生活#热门@7561466856432799022/7561466856432799022.mp4 deleted file mode 100644 index fcd4d52..0000000 Binary files a/app/coll2/随拍/炒瓜子晃两下就冒烟,这操作我直接看呆#路边摊美味#美食#搞笑#生活#热门@7561466856432799022/7561466856432799022.mp4 and /dev/null differ diff --git a/app/fav2/author/2664814926116075.jpg b/app/fav2/author/2664814926116075.jpg deleted file mode 100644 index 111ea42..0000000 Binary files a/app/fav2/author/2664814926116075.jpg and /dev/null differ diff --git a/app/fav2/author/66899755406.jpg b/app/fav2/author/66899755406.jpg deleted file mode 100644 index e187791..0000000 Binary files a/app/fav2/author/66899755406.jpg and /dev/null differ diff --git a/app/fav2/author/75856936333.jpg b/app/fav2/author/75856936333.jpg deleted file mode 100644 index d61c430..0000000 Binary files a/app/fav2/author/75856936333.jpg and /dev/null differ diff --git a/app/fav2/亲子/他就爱没事找事,我懒得解释!#母子日常#一身反骨的人类幼崽@7370252700547566857/7370252700547566857.mp4 b/app/fav2/亲子/他就爱没事找事,我懒得解释!#母子日常#一身反骨的人类幼崽@7370252700547566857/7370252700547566857.mp4 deleted file mode 100644 index 8f7b17a..0000000 Binary files a/app/fav2/亲子/他就爱没事找事,我懒得解释!#母子日常#一身反骨的人类幼崽@7370252700547566857/7370252700547566857.mp4 and /dev/null differ diff --git a/app/fav2/科普/万万没想到,文件传输助手竟如此全能#文件传输助手#冷知识@7533611997993225499/.nfo b/app/fav2/科普/万万没想到,文件传输助手竟如此全能#文件传输助手#冷知识@7533611997993225499/.nfo deleted file mode 100644 index c59f87a..0000000 --- a/app/fav2/科普/万万没想到,文件传输助手竟如此全能#文件传输助手#冷知识@7533611997993225499/.nfo +++ /dev/null @@ -1,19 +0,0 @@ - - - 万万没想到,文件传输助手竟如此全能 #文件传输助手 #冷知识 - 主持人阿喆 - 2025-08-01 - 科普 - 冷知识 - - - 主持人阿喆 - 主演 - app/fav2\author\75856936333.jpg - - - poster.jpg - - poster.jpg - - \ No newline at end of file diff --git a/app/fav2/科普/万万没想到,文件传输助手竟如此全能#文件传输助手#冷知识@7533611997993225499/7533611997993225499.mp4 b/app/fav2/科普/万万没想到,文件传输助手竟如此全能#文件传输助手#冷知识@7533611997993225499/7533611997993225499.mp4 deleted file mode 100644 index 24c7453..0000000 Binary files a/app/fav2/科普/万万没想到,文件传输助手竟如此全能#文件传输助手#冷知识@7533611997993225499/7533611997993225499.mp4 and /dev/null differ diff --git a/app/fav2/科普/万万没想到,文件传输助手竟如此全能#文件传输助手#冷知识@7533611997993225499/poster.jpg b/app/fav2/科普/万万没想到,文件传输助手竟如此全能#文件传输助手#冷知识@7533611997993225499/poster.jpg deleted file mode 100644 index e232b56..0000000 Binary files a/app/fav2/科普/万万没想到,文件传输助手竟如此全能#文件传输助手#冷知识@7533611997993225499/poster.jpg and /dev/null differ diff --git a/app/fav2/随拍/幸福的愿望想念变成空气在叹息@7517656545376390459/.nfo b/app/fav2/随拍/幸福的愿望想念变成空气在叹息@7517656545376390459/.nfo deleted file mode 100644 index ce04559..0000000 --- a/app/fav2/随拍/幸福的愿望想念变成空气在叹息@7517656545376390459/.nfo +++ /dev/null @@ -1,20 +0,0 @@ - - - 幸福的愿望 想念变成空气在叹息 - 小思宇 - 2025-06-19 - 随拍 - 人物随拍 - 人物图片轮播 - - - 小思宇 - 主演 - app/fav2\author\2664814926116075.jpg - - - poster.jpg - - poster.jpg - - \ No newline at end of file diff --git a/app/fav2/随拍/幸福的愿望想念变成空气在叹息@7517656545376390459/7517656545376390459.mp4 b/app/fav2/随拍/幸福的愿望想念变成空气在叹息@7517656545376390459/7517656545376390459.mp4 deleted file mode 100644 index 0516875..0000000 Binary files a/app/fav2/随拍/幸福的愿望想念变成空气在叹息@7517656545376390459/7517656545376390459.mp4 and /dev/null differ diff --git a/app/fav2/随拍/幸福的愿望想念变成空气在叹息@7517656545376390459/poster.jpg b/app/fav2/随拍/幸福的愿望想念变成空气在叹息@7517656545376390459/poster.jpg deleted file mode 100644 index ded0c1b..0000000 Binary files a/app/fav2/随拍/幸福的愿望想念变成空气在叹息@7517656545376390459/poster.jpg and /dev/null differ diff --git a/app/fav2/随拍/放假领她去帮我哥打包,体验生活的不容易。#生产车间现场#拼命努力的挣钱#工作实拍@7393659258765724966/.nfo b/app/fav2/随拍/放假领她去帮我哥打包,体验生活的不容易。#生产车间现场#拼命努力的挣钱#工作实拍@7393659258765724966/.nfo deleted file mode 100644 index 7e834b6..0000000 --- a/app/fav2/随拍/放假领她去帮我哥打包,体验生活的不容易。#生产车间现场#拼命努力的挣钱#工作实拍@7393659258765724966/.nfo +++ /dev/null @@ -1,20 +0,0 @@ - - - 放假领她去帮我哥打包,体验生活的不容易。#生产车间现场 #拼命努力的挣钱 #工作实拍 - 郭小胖 - 2024-07-20 - 随拍 - 生活记录 - 日常vlog - - - 郭小胖 - 主演 - app/fav2\author\66899755406.jpg - - - poster.jpg - - poster.jpg - - \ No newline at end of file diff --git a/app/fav2/随拍/放假领她去帮我哥打包,体验生活的不容易。#生产车间现场#拼命努力的挣钱#工作实拍@7393659258765724966/7393659258765724966.mp4 b/app/fav2/随拍/放假领她去帮我哥打包,体验生活的不容易。#生产车间现场#拼命努力的挣钱#工作实拍@7393659258765724966/7393659258765724966.mp4 deleted file mode 100644 index c818673..0000000 Binary files a/app/fav2/随拍/放假领她去帮我哥打包,体验生活的不容易。#生产车间现场#拼命努力的挣钱#工作实拍@7393659258765724966/7393659258765724966.mp4 and /dev/null differ diff --git a/app/fav2/随拍/放假领她去帮我哥打包,体验生活的不容易。#生产车间现场#拼命努力的挣钱#工作实拍@7393659258765724966/poster.jpg b/app/fav2/随拍/放假领她去帮我哥打包,体验生活的不容易。#生产车间现场#拼命努力的挣钱#工作实拍@7393659258765724966/poster.jpg deleted file mode 100644 index ff718c9..0000000 Binary files a/app/fav2/随拍/放假领她去帮我哥打包,体验生活的不容易。#生产车间现场#拼命努力的挣钱#工作实拍@7393659258765724966/poster.jpg and /dev/null differ diff --git a/app/src/App.vue b/app/src/App.vue index be407d4..61e4341 100644 --- a/app/src/App.vue +++ b/app/src/App.vue @@ -16,8 +16,6 @@ - - + - - - - - - - - - - - - - - - - - --> - - + + + + - + + +.action-icon { + font-size: 20px; +} + +/* 样式兜底:确保每个版本项内部单行,外部纵向排列 */ +:deep(.custom-version-notification) { + .ant-notification-notice-description { + white-space: normal !important; /* 允许版本项纵向换行 */ + width: 100% !important; + height: auto !important; + overflow: visible !important; + } + + .custom-version-item { + display: flex !important; + align-items: center !important; + justify-content: space-between !important; + white-space: nowrap !important; /* 禁止版本项内部换行 */ + padding: 8px 12px !important; /* 重置内边距,去掉左侧竖线空间 */ + + &:hover { + background-color: #f5fafe !important; + } + + &:last-child { + border-bottom: none !important; + } + } + + /* 当前版本轻微高亮(可选,可删除) */ + .custom-current-version { + background-color: rgba(24, 144, 255, 0.05) !important; + + &:hover { + background-color: rgba(24, 144, 255, 0.1) !important; + } + } + + /* 按钮hover样式 */ + button:hover { + background-color: rgba(24, 144, 255, 0.1) !important; + color: #1890ff !important; + } +} + \ No newline at end of file diff --git a/app/src/components/layout/VersionDrawer.vue b/app/src/components/layout/VersionDrawer.vue new file mode 100644 index 0000000..e9d7113 --- /dev/null +++ b/app/src/components/layout/VersionDrawer.vue @@ -0,0 +1,188 @@ + + + + + + + + + + {{ tag }} + + + + 当前版本 + + + + + + + + + + 暂无版本数据 + + + + + + + \ No newline at end of file diff --git a/app/src/pages/followd/index.vue b/app/src/pages/followd/index.vue index b100dd2..bbf6fbc 100644 --- a/app/src/pages/followd/index.vue +++ b/app/src/pages/followd/index.vue @@ -19,10 +19,10 @@ - + 立即同步 + @@ -67,7 +67,7 @@ - {{ item.savePath || '未设置存储文件夹名称' }} + {{ item.savePath || '默认用作者名字' }} handleEditPath(item)" title="编辑文件夹名称" :disabled="item.isSaving"> @@ -95,7 +95,7 @@ 暂无更多数据 - + @@ -305,15 +305,7 @@ const handleScroll = () => { // 开关状态变更(启用/禁用用户) const handleSwitchChange = (item, checked) => { - item.openSync = checked; - if (!checked) item.isEditing = false; // 禁用时关闭编辑状态 - if (!checked) { - uploadSyncStatus(item); - } else { - if (item.savePath.length > 0) { - uploadSyncStatus(item); - } - } + uploadSyncStatus(item); }; // 全量同步开关变更 @@ -342,7 +334,6 @@ const handleSavePath = (item) => { uploadSyncStatus(item); }; const uploadSyncStatus = (item) => { - item.isSaving = true; useApiStore() .OpenOrCloseSync({ Id: item.id, @@ -371,29 +362,7 @@ const uploadSyncStatus = (item) => { //全量同步开关 const uploadFullSyncStatus = (item) => { item.isSaving = true; - useApiStore() - .OpenOrCloseFullSync({ - Id: item.id, - OpenSync: item.openSync, - FullSync: item.fullSync, - SavePath: item.savePath, // 保持原有逻辑:提交 savePath - }) - .then((res) => { - if (res.code === 0) { - message.success(`保存成功,将在下次任务执行时生效`); - item.isEditing = false; // 保存成功后关闭编辑状态 - } else { - message.error('保存失败' + (res.msg || '未知错误')); - } - }) - .catch((err) => { - console.error('保存失败', err); - message.error('保存失败,请重试'); - }) - .finally(() => { - // 接口响应结束:解除禁用(无论成功失败) - item.isSaving = false; - }); + uploadSyncStatus(item); }; // 批量同步所有用户 diff --git a/app/src/pages/set/AppSet.vue b/app/src/pages/set/AppSet.vue index 1cd7f33..f5389db 100644 --- a/app/src/pages/set/AppSet.vue +++ b/app/src/pages/set/AppSet.vue @@ -44,10 +44,14 @@ - + - 选择生成文件名的占位符,顺序即为文件名顺序(需配合分隔符使用) + + 选择生成文件名的占位符,顺序即为文件名顺序(需配合分隔符使用) + 占位符说明: + {Id}=视频ID、{VideoTitle}=视频标题、{ReleaseTime}=发布时间、{Author}=博主名称、{FileHash}=文件哈希、{Resolution}=分辨率 + @@ -55,13 +59,23 @@ - 占位符之间的连接符(如“-”“_”),为空则直接拼接 + + 占位符之间的连接符(如“-”“_”“.”),为空则直接拼接 + 示例:选择{Author}和{VideoTitle},分隔符填“-”,将生成“博主名称-视频标题”格式文件名 + + + + + 实时展示您选择的占位符和分隔符组合效果 + 示例:选择{Author}、{ReleaseTime}、{Id},分隔符填“_”,预览结果为“博主名称_20250101_123456” + + @@ -150,20 +164,19 @@ import type { Rule } from 'ant-design-vue/es/form'; import type { FormInstance } from 'ant-design-vue'; import { useApiStore } from '@/store'; import { message } from 'ant-design-vue'; -import { InfoCircleOutlined } from '@ant-design/icons-vue'; +import { InfoCircleOutlined, SaveOutlined, CheckOutlined } from '@ant-design/icons-vue'; // 表单引用 const formRef = ref(); // 模板字段:结构化数组 const template_options = [ - { label: '{Id}', value: '{Id}' }, - { label: '{VideoTitle}', value: '{VideoTitle}' }, - { label: '{FileHash}', value: '{FileHash}' }, - // { label: '{FileSize}', value: '{FileSize}' }, - { label: '{Resolution}', value: '{Resolution}' }, - // { label: '{SyncTime}', value: '{SyncTime}' }, - { label: '{ReleaseTime}', value: '{ReleaseTime}' }, + { label: '{Id} (视频ID)', value: '{Id}' }, + { label: '{VideoTitle} (视频标题)', value: '{VideoTitle}' }, + { label: '{ReleaseTime} (发布时间)', value: '{ReleaseTime}' }, + { label: '{Author} (博主名称)', value: '{Author}' }, + { label: '{FileHash} (文件哈希)', value: '{FileHash}' }, + { label: '{Resolution} (分辨率)', value: '{Resolution}' }, ]; // 状态定义 @@ -415,4 +428,16 @@ const onCancel = () => { :deep(.ant-input-disabled) { color: #666 !important; } + +// 模板选择器选项样式优化 +:deep(.ant-select-item-option-content) { + display: flex; + align-items: center; +} + +// 提示信息中的强调文本样式 +:deep(.text-gray-700) { + color: #444 !important; + font-weight: 500; +} \ No newline at end of file diff --git a/app/src/store/coreapi.ts b/app/src/store/coreapi.ts index b84fba1..45ab263 100644 --- a/app/src/store/coreapi.ts +++ b/app/src/store/coreapi.ts @@ -210,7 +210,28 @@ export const useApiStore = defineStore('coreapi', () => { }); } + + + //当前版本 + async function MyTag() { + return http.request>('/api/config/mytag', 'get').then(r => { + return r.data; + }).finally(() => { + + }); + } + + //检查版本 + async function CheckTag() { + return http.request>('/api/config/checktag', 'get').then(r => { + return r.data; + }).finally(() => { + + }); + } return { + CheckTag, + MyTag, deleteCookie, UpdateConfig, apiCheckInitStatus, diff --git a/appsettings.json b/appsettings.json index 47fd9a6..f8e81d5 100644 --- a/appsettings.json +++ b/appsettings.json @@ -1,5 +1,6 @@ { "dbconn": "", "dbtype": "Sqlite", - "DOWN_IMGVIDEO": "1" + "DOWN_IMGVIDEO": "1", + "tagName": "beta_1.5.7" } \ No newline at end of file diff --git a/docs/follows.png b/docs/follows.png new file mode 100644 index 0000000..7eca2e0 Binary files /dev/null and b/docs/follows.png differ diff --git a/dto/TenImageApiResponse.cs b/dto/TenImageApiResponse.cs new file mode 100644 index 0000000..2d46b20 --- /dev/null +++ b/dto/TenImageApiResponse.cs @@ -0,0 +1,108 @@ +namespace dy.net.dto +{ + //ãղصַæ + public class ImageTagInfoItem + { + /// + /// + /// + public string Architecture { get; set; } + /// + /// + /// + public string Author { get; set; } + /// + /// + /// + public string CreationTime { get; set; } + /// + /// + /// + public string DockerVersion { get; set; } + /// + /// + /// + public string DurationDays { get; set; } + /// + /// + /// + public int Id { get; set; } + /// + /// + /// + public string ImageId { get; set; } + /// + /// + /// + public string Kind { get; set; } + /// + /// + /// + public string OS { get; set; } + /// + /// + /// + public string PushTime { get; set; } + /// + /// + /// + public string Size { get; set; } + /// + /// + /// + public int SizeByte { get; set; } + /// + /// + /// + public string TagId { get; set; } + /// + /// + /// + public string TagName { get; set; } + /// + /// + /// + public string UpdateTime { get; set; } + } + + public class ImageData + { + /// + /// + /// + public string RepoName { get; set; } + /// + /// + /// + public string Server { get; set; } + /// + /// + /// + public int TagCount { get; set; } + /// + /// + /// + public List TagInfo { get; set; } + } + + public class ImageResponse + { + /// + /// + /// + public ImageData Data { get; set; } + /// + /// + /// + public string RequestId { get; set; } + } + + public class TenImageApiResponse + { + /// + /// + /// + public ImageResponse Response { get; set; } + } + +} diff --git a/dto/VideoTitleDataTemplate.cs b/dto/VideoTitleDataTemplate.cs index e99f350..d0df0c2 100644 --- a/dto/VideoTitleDataTemplate.cs +++ b/dto/VideoTitleDataTemplate.cs @@ -19,7 +19,7 @@ /// 对应 {Resolution}(分辨率,如 1920x1080) public string Resolution { get; set; } = string.Empty; - + public string Author { get; set; } = string.Empty; /// 对应 {FileSize}(文件大小,单位:字节) //public long FileSize { get; set; } = 0; } diff --git a/dy.net.csproj b/dy.net.csproj index 6d39504..f05229d 100644 --- a/dy.net.csproj +++ b/dy.net.csproj @@ -23,15 +23,19 @@ + + + + @@ -64,7 +68,6 @@ - @@ -74,9 +77,12 @@ - - Always - + + lib\dy.sync.lib.dll + + + + Always diff --git a/job/DouyinBasicSyncJob.cs b/job/DouyinBasicSyncJob.cs index 9bda377..9e54808 100644 --- a/job/DouyinBasicSyncJob.cs +++ b/job/DouyinBasicSyncJob.cs @@ -414,6 +414,7 @@ namespace dy.net.job { if (File.Exists(exitVideo.VideoSavePath)) { + Serilog.Log.Debug($"视频-{exitVideo.AwemeId}-[{exitVideo.VideoTitle}]已存在,跳过"); continue;// 已存在则跳过 } } diff --git a/job/DouyinFollowedViedoSyncJob.cs b/job/DouyinFollowedViedoSyncJob.cs index 112d64d..d77bb64 100644 --- a/job/DouyinFollowedViedoSyncJob.cs +++ b/job/DouyinFollowedViedoSyncJob.cs @@ -128,7 +128,8 @@ namespace dy.net.job Id = item.AwemeId, ReleaseTime = DateTimeUtil.Convert10BitTimestamp(item.CreateTime), Resolution = $"{Width}×{Height}", - VideoTitle = DouyinFileNameHelper.GenerateFileName(item.Desc, item.AwemeId) + VideoTitle = DouyinFileNameHelper.GenerateFileName(item.Desc, item.AwemeId), + Author = item.Author.Nickname }); fileName= $"{DouyinFileNameHelper.SanitizePath(fullName)}.{Format}"; diff --git a/lib/dy.sync.lib.dll b/lib/dy.sync.lib.dll new file mode 100644 index 0000000..9fb89a8 Binary files /dev/null and b/lib/dy.sync.lib.dll differ diff --git a/model/DouyinCookie.cs b/model/DouyinCookie.cs index f995f84..048a7fd 100644 --- a/model/DouyinCookie.cs +++ b/model/DouyinCookie.cs @@ -14,6 +14,7 @@ namespace dy.net.model /// /// 用户抖音ID,对应我关注信息里面的myself_user_id /// + [SugarColumn(Length =500,IsNullable =true)] public string MyUserId { get; set; } /// /// 用户描述 diff --git a/repository/DouyinCookieRepository.cs b/repository/DouyinCookieRepository.cs index 8cc8547..28ad071 100644 --- a/repository/DouyinCookieRepository.cs +++ b/repository/DouyinCookieRepository.cs @@ -36,5 +36,11 @@ namespace dy.net.repository return (list, totalCount); } + public DouyinCookie GetDefault() + { + return Db.Queryable() + .First(); + } + } } diff --git a/service/DouyinCommonService.cs b/service/DouyinCommonService.cs index f56c902..eb4fa19 100644 --- a/service/DouyinCommonService.cs +++ b/service/DouyinCommonService.cs @@ -59,7 +59,8 @@ namespace dy.net.service ImageViedoSaveAlone = true, FollowedTitleTemplate ="", FullFollowedTitleTemplate="", - FollowedTitleSeparator="" + FollowedTitleSeparator="", + AutoDistinct=true,//默认开启 }; sqlSugarClient.Insertable(config).ExecuteCommand(); return config; diff --git a/service/DouyinCookieService.cs b/service/DouyinCookieService.cs index 55df052..2272f1b 100644 --- a/service/DouyinCookieService.cs +++ b/service/DouyinCookieService.cs @@ -1,7 +1,9 @@ -using dy.net.model; +using ClockSnowFlake; +using dy.net.model; using dy.net.repository; using SqlSugar; using System.Linq.Expressions; +using System.Threading.Tasks; namespace dy.net.service { @@ -28,18 +30,17 @@ namespace dy.net.service public bool InitCookie() { - var initId= "2026"; - var exist = _cookieRepository.GetFirst(x => x.Id == initId); + var exist = _cookieRepository.GetDefault(); if (exist != null) { - return false; + return true; } var cookie = new DouyinCookie { UserName = "douyin", Cookies = "-", SecUserId = "-", - Id = initId, + Id = IdGener.GetLong().ToString(), Status = 0, SavePath = "/app/collect", FavSavePath = "/app/favorite", @@ -48,6 +49,7 @@ namespace dy.net.service CollHasSyncd = 0, FavHasSyncd = 0, UperSyncd = 0, + MyUserId="" }; return _cookieRepository.Insert(cookie); } diff --git a/service/DouyinVideoService.cs b/service/DouyinVideoService.cs index 68f3050..96d26eb 100644 --- a/service/DouyinVideoService.cs +++ b/service/DouyinVideoService.cs @@ -213,25 +213,51 @@ namespace dy.net.service Serilog.Log.Error(e, "数据库事务执行失败:Ids={0}", string.Join(",", videoIds)); }); - // 5. 文件删除(非事务操作,失败不回滚数据库,可根据业务调整) - // 采用异步文件操作,避免同步IO阻塞线程(需.NET 5+支持) - foreach (var path in filePathsToDelete) + // 5. 文件夹删除(非事务操作,失败不回滚数据库,可根据业务调整) + // 关键:先通过文件路径获取父文件夹,再删除整个文件夹(含子内容) + foreach (var filePath in filePathsToDelete) { try { - if (File.Exists(path)) + // 1. 验证文件路径有效性 + if (string.IsNullOrWhiteSpace(filePath)) { - File.Delete(path); // 异步删除,提升并发性能 - Serilog.Log.Debug("视频文件删除成功:Path={0}", path); + Serilog.Log.Error("文件路径为空,跳过文件夹删除"); + continue; + } + + // 2. 获取文件对应的父文件夹路径(无论文件是否存在,只要路径合法就能拿到父目录) + string parentDirPath = Path.GetDirectoryName(filePath); + if (string.IsNullOrWhiteSpace(parentDirPath)) + { + Serilog.Log.Error("无法获取父文件夹路径,文件路径无效:Filepath={0}", filePath); + continue; + } + + // 3. 验证父文件夹是否存在 + if (Directory.Exists(parentDirPath)) + { + Directory.Delete(parentDirPath, recursive: true); + Serilog.Log.Debug("文件夹删除成功(含子内容):ParentDir={0},关联文件路径={1}", parentDirPath, filePath); } else { - Serilog.Log.Error("视频文件不存在,跳过删除:Path={0}", path); + Serilog.Log.Error("父文件夹不存在,跳过删除:ParentDir={0},关联文件路径={1}", parentDirPath, filePath); } } catch (IOException ex) { - Serilog.Log.Error(ex, "视频文件删除失败:Path={0}", path); + Serilog.Log.Error(ex, "文件夹删除失败(IO异常):Filepath={0},父文件夹路径={1}", filePath, Path.GetDirectoryName(filePath)); + } + catch (UnauthorizedAccessException ex) + { + // 单独捕获权限异常,更精准的日志提示 + Serilog.Log.Error(ex, "文件夹删除失败(权限不足):Filepath={0},父文件夹路径={1}", filePath, Path.GetDirectoryName(filePath)); + } + catch (Exception ex) + { + // 捕获所有其他异常,避免循环中断 + Serilog.Log.Error(ex, "文件夹删除失败(未知异常):Filepath={0},父文件夹路径={1}", filePath, Path.GetDirectoryName(filePath)); } } diff --git a/utils/DouyinFileNameHelper.cs b/utils/DouyinFileNameHelper.cs index e8abac6..cf82d76 100644 --- a/utils/DouyinFileNameHelper.cs +++ b/utils/DouyinFileNameHelper.cs @@ -96,7 +96,7 @@ namespace dy.net.utils // 步骤6:移除首尾无效字符(分隔符、点号) title = title.Replace(" ","").Trim(Separator, '.'); - + title = title.Replace("--", "-");//避免多个连续---- // 容错:如果净化后为空,返回默认值 return string.IsNullOrWhiteSpace(title) ? id : title; } @@ -151,7 +151,7 @@ namespace dy.net.utils //string emojiPattern = @"[\u1F600-\u1F64F\u1F300-\u1F5FF\u1F680-\u1F6FF\u1E000-\u1EFFF\u2600-\u2B55\u200D]"; //path = Regex.Replace(path, emojiPattern, "", RegexOptions.Compiled); path = Regex.Replace(path, @"[^a-zA-Z0-9\u4e00-\u9fa5]", "-"); - + path = path.Replace("--", "-");//避免重复--- foreach (var c in Path.GetInvalidFileNameChars()) { path = path.Replace(c, '_'); diff --git a/utils/VideoTitleGenerator.cs b/utils/VideoTitleGenerator.cs index fea1314..6feedcb 100644 --- a/utils/VideoTitleGenerator.cs +++ b/utils/VideoTitleGenerator.cs @@ -20,7 +20,7 @@ namespace dy.net.utils public static string Generate( string template, VideoTitleDataTemplate data, - string timeFormat = "yyyyMMddHHmmss", + string timeFormat = "yyyyMMdd", string emptyPlaceholder = "") { // 校验入参 @@ -36,6 +36,7 @@ namespace dy.net.utils ["VideoTitle"] = string.IsNullOrWhiteSpace(data.VideoTitle) ? emptyPlaceholder : data.VideoTitle, ["FileHash"] = string.IsNullOrWhiteSpace(data.FileHash) ? emptyPlaceholder : data.FileHash, ["Resolution"] = string.IsNullOrWhiteSpace(data.Resolution) ? emptyPlaceholder : data.Resolution, + ["Author"] = string.IsNullOrWhiteSpace(data.Author) ? emptyPlaceholder : data.Author, // 时间字段(支持空值处理) //["SyncTime"] = data.SyncTime.HasValue ? data.SyncTime.Value.ToString(timeFormat) : emptyPlaceholder, @@ -54,7 +55,7 @@ namespace dy.net.utils return placeholderMap.TryGetValue(placeholderKey, out var value) ? value : match.Value; }); - return finalTitle; + return finalTitle.Replace("--","-"); } ///