mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-22 16:48:42 +00:00
feat(api): remove mediaType and mimeType from DTO responses and DB MediaInfo interface
This commit is contained in:
@@ -58,10 +58,9 @@ export async function transcodeVideoWorkflow(task: WorkflowTask): Promise<void>
|
||||
codec: '',
|
||||
}
|
||||
|
||||
const mimeType = mediaInfo.mimeType
|
||||
const metadata = mediaInfo.metadata
|
||||
|
||||
if (mimeType.startsWith('video/') && metadata) {
|
||||
if (mediaInfo.proxyType === 'video' && metadata) {
|
||||
const videoResolutions = getTargetVideoResolutions(
|
||||
spec.videoStrategy || 'best_match',
|
||||
metadata.originalWidth,
|
||||
@@ -103,7 +102,7 @@ export async function transcodeVideoWorkflow(task: WorkflowTask): Promise<void>
|
||||
})
|
||||
}
|
||||
|
||||
const isAudio = mimeType.startsWith('audio/')
|
||||
const isAudio = mediaInfo.proxyType === 'audio'
|
||||
if (isAudio && metadata) {
|
||||
const audioTranscode = await executeActivity(workerQueue, transcodeAudioActivity, {
|
||||
assetKey: key,
|
||||
|
||||
Reference in New Issue
Block a user