fix(video): transcribe archived videos and show progress (#560)

This commit is contained in:
Yiling-J
2026-12-04 15:37:58 +08:00
committed by GitHub
parent d3899d1257
commit 72a7f68c92
21 changed files with 408 additions and 171 deletions
+20
View File
@@ -0,0 +1,20 @@
import type { AssetInfo } from '@shumai/dtos'
export function getTranscriptVideo(item: AssetInfo) {
const isVideo = item.proxyType ? item.proxyType === 'video' : item.mediaType?.startsWith('video/')
if (!isVideo) return undefined
if (item.type === 'version_stack') {
const version = item.versionStack?.versions.find(({ current }) => current)
if (version) {
return {
id: version.id,
name: version.name || item.name,
status: version.status ?? item.status,
}
}
}
if (item.type === 'file' && item.id) {
return { id: item.id, name: item.name, status: item.status }
}
}