fix: use collection title for subdirectory name
修复合集目录名称问题: - 添加 collectionTitle 字段存储视频合集标题(ugc_season.title) - 创建子目录时使用合集名称而非视频标题 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -61,7 +61,8 @@ export const start = async (
|
||||
})),
|
||||
dimension: info.dimension,
|
||||
owner: info.owner,
|
||||
staff: info.staff?.map(i => `${i.name}[${i.title}]`) || []
|
||||
staff: info.staff?.map(i => `${i.name}[${i.title}]`) || [],
|
||||
collectionTitle: info.ugc_season?.title
|
||||
}
|
||||
workRoute.videoInfoCardMode.val = 'video'
|
||||
})
|
||||
|
||||
@@ -37,6 +37,9 @@ export type VideoParseResult = {
|
||||
|
||||
section: SectionItem[]
|
||||
|
||||
/** 视频合集标题(ugc_season.title),用于创建子目录 */
|
||||
collectionTitle?: string
|
||||
|
||||
/** 合集作者 */
|
||||
owner: {
|
||||
mid: number
|
||||
|
||||
@@ -156,9 +156,12 @@ 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
|
||||
// 合集标题,用于创建子目录
|
||||
// season 模式(番剧)或有多个 section(视频合集)时创建子目录
|
||||
const hasMultipleSections = workRoute.videoInfoCardData.val.section.length > 0
|
||||
const seasonTitle = (workRoute.videoInfoCardMode.val == 'season' || (isVideoMode && hasMultipleSections)) ? cardTitle.trim() : undefined
|
||||
// season 模式(番剧)使用视频标题
|
||||
// video 模式有 collectionTitle(视频合集)时使用合集名称
|
||||
const collectionTitle = workRoute.videoInfoCardData.val.collectionTitle
|
||||
const seasonTitle = workRoute.videoInfoCardMode.val == 'season'
|
||||
? cardTitle.trim()
|
||||
: (isVideoMode && collectionTitle ? collectionTitle.trim() : undefined)
|
||||
|
||||
return ({
|
||||
bvid: info.page.bvid,
|
||||
|
||||
Reference in New Issue
Block a user