download working

This commit is contained in:
2023-01-11 20:49:25 +01:00
parent b29cdf802d
commit 4d4582b3f7
8 changed files with 584 additions and 474 deletions

43
frontend/src/types.d.ts vendored Normal file
View File

@@ -0,0 +1,43 @@
export type RPCMethods =
| "Service.Exec"
| "Service.Kill"
| "Service.Running"
| "Service.KillAll"
| "Service.FreeSpace"
| "Service.Formats"
export type RPCRequest = {
method: RPCMethods,
params?: any[],
id?: string
}
export type RPCResponse<T> = {
result: T,
error: number | null
id?: string
}
export type RPCResult = {
id: string
progress: {
speed: number
eta: number
percentage: string
}
info: {
url: string
filesize_approx?: number
resolution?: string
thumbnail: string
title: string
vcodec?: string
acodec?: string
ext?: string
}
}
export type RPCParams = {
URL: string
Params?: string
}