From 60a716cb46494a1e70617c8ac8c082cbad4af2a4 Mon Sep 17 00:00:00 2001 From: yw1573 Date: Thu, 9 Apr 2026 18:23:57 +0800 Subject: [PATCH] feat: create collection directory for video sections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 当视频有多个 section(合集)时,也创建合集子目录存放下载的视频。 之前只有番剧模式(season)才会创建子目录。 Co-Authored-By: Claude Opus 4.6 --- web/src/work/view/parseModal.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/src/work/view/parseModal.ts b/web/src/work/view/parseModal.ts index 053a676..c332012 100644 --- a/web/src/work/view/parseModal.ts +++ b/web/src/work/view/parseModal.ts @@ -156,7 +156,9 @@ export class ParseModalComp implements VanComponent { const activeVideoInfo = getActiveFormatVideo(info.info!, info.info!.accept_quality[info.formatIndex.val], this.preferredCodec.val) const pagesLength = workRoute.videoInfoCardData.val.pages.length // 合集标题,用于创建子目录 - const seasonTitle = workRoute.videoInfoCardMode.val == 'season' ? cardTitle.trim() : undefined + // season 模式(番剧)或有多个 section(视频合集)时创建子目录 + const hasMultipleSections = workRoute.videoInfoCardData.val.section.length > 0 + const seasonTitle = (workRoute.videoInfoCardMode.val == 'season' || (isVideoMode && hasMultipleSections)) ? cardTitle.trim() : undefined return ({ bvid: info.page.bvid,