Tracs validation added. A warning is thrown if the input contains a video strem, but the requested output format doesn't support it
This commit is contained in:
@@ -46,3 +46,20 @@ export const getDownloadUrl = (task_id: string): string => {
|
||||
export const getDownloadZipUrl = (task_id: string): string => {
|
||||
return `/api/download/${task_id}/splits.zip`
|
||||
}
|
||||
|
||||
// New functions for format validation feature
|
||||
export const getFormatInfo = async (): Promise<{ formats: Array<{ name: string; audio_only: boolean }> }> => {
|
||||
const response = await api.get('/formats')
|
||||
return response.data
|
||||
}
|
||||
|
||||
export const getTaskInfo = async (task_id: string): Promise<{
|
||||
task_id: string
|
||||
has_audio: boolean
|
||||
has_video: boolean
|
||||
has_subtitle: boolean
|
||||
audio_codec: string | null
|
||||
}> => {
|
||||
const response = await api.get(`/info/${task_id}`)
|
||||
return response.data
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user